C++
C with objects, templates and the standard library.
C++ is taught here in 13 lessons, running from Modern C++ basics through to C++20 and C++23 in practice. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Programming Languages |
| Lessons | 13 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: C |
Lessons
- Modern C++ basicsThe compiler pipeline, value and reference semantics, and the modern features that replaced preprocessor habits with type-safe ones.
- Classes, constructors and RAIIDefine types that hold an invariant, understand the special member functions, and let destructors own resources deterministically.
- The standard library and smart pointersContainers, algorithms and ownership: choose the right container and make leaks structurally impossible.
- Setting up C++: compilers, CMake and the build workflowInstall a modern compiler, pick a language standard, wire warnings and sanitizers into the build, and structure a CMake project.
- Strings, streams and formattingUse string and string_view without dangling views, choose between iostream and std::format, and parse text and paths robustly.
- References, const correctness and value categoriesTell lvalues from rvalues, use std::move and std::forward correctly, and design interfaces that refuse to copy unnecessarily.
- Templates, concepts and generic programmingWrite function and class templates, use variadic packs and fold expressions, and constrain them with C++20 concepts for readable errors.
- Lambdas, algorithms and rangesCapture correctly, choose between the algorithm and ranges forms, chain lazy views, and avoid iterator invalidation.
- Exceptions and error handlingThrow by value and catch by reference, know the safety guarantees, and choose between exceptions, optional and expected.
- Concurrency: threads, mutexes and asyncStart threads safely, guard shared state, use condition variables and atomics, and know what a data race actually costs.
- Testing, sanitizers and profilingStructure tests with GoogleTest or Catch2, run sanitizers and coverage in CI, benchmark with Google Benchmark, and profile with perf.
- CMake, dependencies and project structureLay out a project that scales, fetch dependencies reproducibly, manage build types, and install or export what you build.
- C++20 and C++23 in practiceAdopt modules, coroutines, format, span and expected deliberately, and check compiler support before you commit to a feature.
More in Programming Languages
FAQ
How long does the C++ course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for C++?
Not strictly. It helps to have read C first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after C++?
Continue with C# (13 lessons), the next course in Programming Languages.