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.

TrackProgramming Languages
Lessons13
LevelBeginner to intermediate
Reading timeabout 3 hours
PrerequisitesHelpful, but not required: C

Lessons

  1. Modern C++ basicsThe compiler pipeline, value and reference semantics, and the modern features that replaced preprocessor habits with type-safe ones.
  2. Classes, constructors and RAIIDefine types that hold an invariant, understand the special member functions, and let destructors own resources deterministically.
  3. The standard library and smart pointersContainers, algorithms and ownership: choose the right container and make leaks structurally impossible.
  4. 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.
  5. Strings, streams and formattingUse string and string_view without dangling views, choose between iostream and std::format, and parse text and paths robustly.
  6. References, const correctness and value categoriesTell lvalues from rvalues, use std::move and std::forward correctly, and design interfaces that refuse to copy unnecessarily.
  7. 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.
  8. Lambdas, algorithms and rangesCapture correctly, choose between the algorithm and ranges forms, chain lazy views, and avoid iterator invalidation.
  9. Exceptions and error handlingThrow by value and catch by reference, know the safety guarantees, and choose between exceptions, optional and expected.
  10. Concurrency: threads, mutexes and asyncStart threads safely, guard shared state, use condition variables and atomics, and know what a data race actually costs.
  11. Testing, sanitizers and profilingStructure tests with GoogleTest or Catch2, run sanitizers and coverage in CI, benchmark with Google Benchmark, and profile with perf.
  12. CMake, dependencies and project structureLay out a project that scales, fetch dependencies reproducibly, manage build types, and install or export what you build.
  13. 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

C C# Scala Lua Dart VBA

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.