Learn
C: Foundations
- Hello, C: Your first programs. What main() is, how printf prints text, and how to read the compiler's complaints.
- Variables and types: Store values in named boxes. int, double and char, printing them with format specifiers, and constants.
- Operators and math: Arithmetic, the integer-division trap, the % remainder operator, precedence, shorthand operators and casts.
- Reading input: Make programs interactive with scanf. Reading numbers, characters and words, and checking that the read worked.
- Making decisions: if, else if and else. Comparison and logical operators, switch, and the ternary operator.
- Loops: Repeat work with while, for and do-while. break, continue, nested loops and loop-driven input.
- Functions: Split programs into named, reusable pieces. Parameters, return values, prototypes, scope and recursion.
C: Memory
- Arrays: Store many values of one type side by side. Indexing, looping, passing arrays to functions and 2D grids.
- Strings: C strings are char arrays ending in '\0'. Length, copying, comparing, and writing string functions yourself.
- Pointers: Addresses and the variables that hold them. & and *, changing a caller's variables, pointer arithmetic, arrays vs pointers, NULL and const.
- Dynamic memory: The stack vs the heap. malloc, free, calloc and realloc, growing arrays, and who owns what.
- Structs, enums and typedef: Group related data into your own types. Struct members, arrays of structs, pointers with ->, enums and typedef.
- Linked data structures: Put structs, pointers and malloc together. Build a linked list and a stack from scratch.
- Bits and the preprocessor: Work with individual bits using bitwise operators and flags, and control compilation with #define and macros.
C: Real-World C
- Files: Read and write real files. fopen modes, fprintf and fscanf, reading lines with fgets, handling errors, appending, safe formatting with snprintf, and a CSV report.
- Function pointers and callbacks: Treat functions as values. Function pointer syntax, typedefs, dispatch tables, qsort comparators, generic code with void*, and callbacks that carry context.
- Integer types and undefined behavior: How big each integer type really is, unsigned wraparound, signed overflow, fixed-width types, size_t traps, floating-point rounding, and the undefined behavior every C programmer must recognize.
- Organizing programs: How real C programs are split into files. Headers and include guards, static and extern, const-correct APIs, command-line arguments, exit codes and stderr.
C++: A Better C
- From C to C++: Everything you know from C still works, plus iostream, std::string, bool, auto and range-based for loops.
- References and functions: References as safer aliases, const& for cheap read-only parameters, overloading and default arguments.
- Classes: Bundle data with the functions that work on it. Member functions, public vs private, constructors, const methods and static members.
- Lifetime and RAII: Destructors, object lifetime and RAII, the idea that makes C++ memory-safe in practice. Plus copying and the rule of three.
- Operator overloading: Teach your own types to work with +, ==, <<, [] and <, so they read like built-in types.
C++: Standard Library
- vector and string: std::vector, the dynamic array you'll use every day, and the most useful std::string operations.
- map, set and friends: Associative containers (map, set, unordered_map), pairs, and the stack and queue adapters.
- Streams and formatting: Parse text with stringstreams, format tables with iomanip, read and write files with fstream, and teach your own types to be read with operator>>.
- Algorithms and lambdas: Stop writing loops by hand. sort, find_if, count_if, accumulate and transform, powered by lambdas.
- More of the STL: The rest of the everyday toolbox. enum class, std::array, deque, priority_queue, iterators and iterator invalidation, and std::function callbacks.
C++: Modern and Advanced
- Smart pointers: unique_ptr and shared_ptr own heap objects for you, so delete disappears from your code. Plus weak_ptr for non-owning links.
- Move semantics: Why C++ can pass big objects around cheaply. lvalues vs rvalues, std::move, move constructors and the rule of five.
- Templates: Write code once for many types. Function and class templates, constexpr, and if constexpr.
- Inheritance and polymorphism: Derived classes, virtual functions and override, abstract interfaces, and polymorphic containers.
- Modern C++ (17 and 20): The features that make today's C++ pleasant. optional, variant, string_view, concepts, ranges and span.
- Handling errors: How to report failure without crashing. assert for bugs, error codes and optional for expected failures, a Result type, and how exceptions fit in.
C++: Professional C++
- Writing iterators and containers: Make your own types work with range-for and the standard algorithms. begin and end, writing an iterator class, const iteration, iterator concepts, lazy ranges and a ring buffer.
- Variadic templates and type traits: Generic code at library level. Parameter packs and fold expressions, perfect forwarding, type traits, writing your own trait, constraining templates with concepts, and compile-time computation.
- Formatting, time and text: The modern standard library for everyday service code. std::format and custom formatters, chrono durations, measuring time, strict number parsing with from_chars, and a log formatter.
- Design patterns in modern C++: The patterns you'll meet in every large C++ codebase, written the modern way. Strategies as closures, a factory registry, observers with weak_ptr, pimpl, RAII wrappers for C libraries, and a table-driven state machine.
Data Structures and Algorithms
- Complexity and searching: Big-O in practice. Trading memory for speed with hash sets, binary search and lower_bound, two pointers, prefix sums and sliding windows, with tests big enough that slow solutions time out.
- Sorting algorithms: How sorting really works. Insertion sort, merge sort, quicksort partitioning, counting sort, stability with custom comparators, and quickselect.
- Hash tables: Build the data structure behind unordered_map. Buckets and chaining, load factor and rehashing, a string-keyed map with erase, custom hashes for your own keys, and an LRU cache.
- Trees and heaps: Recursive thinking with trees. Binary tree basics, binary search trees, traversals and validation, level-order with a queue, a binary heap by hand, and a trie for autocomplete.
- Graphs: Model connections. Adjacency lists, breadth-first shortest paths on a grid, depth-first flood fill, topological sort for build order, Dijkstra with a priority queue, and union-find.
Capstone: Code Review
- Capstone: code review: Review realistic pull requests the way a senior engineer would. Each step hides several real bugs (off-by-one errors, dangling references, leaks on error paths, invalidated iterators, integer overflow and broken class design) for you to find and fix.