C++ Modules
No in-browser runner for C++ — you'll install a real compiler and run everything on your own machine, starting with this module.
Getting Started
Install a real toolchain and compile your first program.
- View module
Modules 1
Getting Set Up
Install a real C++ toolchain and VS Code, and compile your first program.
6 lessons
Part I — Foundations
Write a correct 200-line program and understand every character of it.
- View module
Modules 2
What a Compiler Actually Does
The four build stages, and how to read compiler and linker errors.
6 lessons
- View module
Modules 3
Values and Types
int, double, char, bool, overflow traps, auto, const, and constexpr.
8 lessons
- View module
Modules 4
Control Flow
Conditionals, switch, loops, range-based for, and block scope.
6 lessons
- View module
Modules 5
Functions
Parameters, references, overloading, recursion, and header files.
8 lessons
- View module
Modules 6
Arrays, Strings, and Your First STL Tools
std::array, std::vector, std::string, I/O, and Milestone Project 1.
9 lessons
Part II — Memory and the Machine
Where C++ stops being “Python with semicolons.” The hardest part.
- View module
Modules 7
Pointers and References
Addresses, dereferencing, nullptr, pointer arithmetic, and const placement.
6 lessons
- View module
Modules 8
The Memory Model
Stack vs heap, RAII, leaks, dangling pointers, and undefined behaviour.
7 lessons
- View module
Modules 9
Structs, Classes, and Object Lifetime
Constructors, destructors, copy and move, and the Rules of Three/Five/Zero.
12 lessons
- View module
Modules 10
Smart Pointers
Ownership as design: unique_ptr, shared_ptr, weak_ptr, and choosing between them.
6 lessons
- View module
Modules 11
Debugging and Tooling
Warnings, GDB, sanitizers, Valgrind, and Milestone Project 2.
6 lessons
Part III — Modern C++ and the Standard Library
Templates, the STL, lambdas, exceptions, and polymorphism.
- View module
Modules 12
Templates
Function and class templates, specialization, variadics, and C++20 concepts.
8 lessons
- View module
Modules 13
The Standard Library
Iterators, containers, algorithms, ranges, optional/variant/expected, and span.
12 lessons
- View module
Modules 14
Lambdas and Functional Style
Lambda syntax, captures, the dangling-capture bug, and std::function.
5 lessons
- View module
Modules 15
Error Handling
Exceptions, safety guarantees, noexcept, and when to use error codes instead.
5 lessons
- View module
Modules 16
Object-Oriented C++
Inheritance, virtual functions, slicing, composition, and Milestone Project 3.
9 lessons
Part IV — Building Real Software
Multi-file projects, CMake, tests, CI, and design idioms.
- View module
Modules 17
Project Structure and the Build
Headers, the One Definition Rule, CMake, libraries, and dependencies.
10 lessons
- Coming soon
Modules 18
Testing
Catch2/GoogleTest, fixtures, testing invariants, and CI across compilers.
5 lessons
- Coming soon
Modules 19
Idioms and Design
RAII wrappers, Pimpl, CRTP, type erasure, and Milestone Project 4.
8 lessons
Part V — Concurrency
Threads, locks, data races, and the tools that catch them.
- Coming soon
Modules 20
Concurrency
Threads, mutexes, deadlock, atomics, futures, thread pools, and Milestone Project 5.
14 lessons
Part VI — Performance and Depth
Measure, optimize, compute at compile time, and ship a capstone.
- Coming soon
Modules 21
Performance
Benchmark first: cache locality, copy elision, allocators, and reading assembly.
10 lessons
- Coming soon
Modules 22
Compile-Time C++
constexpr, consteval, type traits, if constexpr, and knowing when to stop.
5 lessons
- Coming soon
Modules 23
Interfacing Outward
extern “C”, the ABI problem, FFI to other languages, and WebAssembly.
4 lessons
- Coming soon
Modules 24
Capstone Projects
Pick a track — graphics, systems, embedded, or numerics — and ship something real.
5 lessons