Learn C++ by doing — the language behind games, engines, browsers, databases, and high-performance systems. From compiling your first program to pointers and the memory model, RAII and smart pointers, classes and polymorphism, the STL, templates and generic programming, move semantics, multithreading, and building real projects with CMake, package managers, and tests.
Before you start
Any prior programming experience helps — if C++ is your first language, the Python course teaches the fundamentals gently. You'll need a C++ compiler (g++, clang, or MSVC) to compile and run the examples.
Setup & Your First Program
Install a compiler, write "Hello, World", and understand the compile → link → run cycle. Print to the console and read input with iostream.
Variables, Types & Operators
C++ is statically typed. Fundamental types, auto type deduction, arithmetic/logical/bitwise operators, and the four named casts — static_cast, const_cast, dynamic_cast, reinterpret_cast.
Control Flow
Branch and loop: if/else and switch, for/while/do-while, and the range-based for loop that iterates any container cleanly.
Functions
Define, overload, and call functions. Pass by value versus reference, default arguments, lambdas (anonymous functions), and operator overloading.
Pointers, References & the Memory Model
The heart of C++: references and raw pointers, the stack-versus-heap memory model, new/delete and object lifetime, and how dangling pointers and memory leaks happen.
Smart Pointers & RAII
Modern C++ owns resources with RAII, not manual new/delete. unique_ptr for single ownership, shared_ptr for shared ownership, and weak_ptr to break reference cycles.
Structs, Classes & OOP
Model your domain with classes: data plus methods, encapsulation, constructors and destructors, structs versus classes, and the Rule of Zero / Three / Five.
Inheritance & Polymorphism
Reuse and extend with inheritance, dynamic dispatch through virtual methods and the vtable, abstract interfaces, dynamic_cast/RTTI, and diamond inheritance solved with virtual bases.
Structuring a Codebase
Split code across headers and source files, use include guards and forward declarations to speed builds, and organize names with namespaces and scope.
Exception Handling
Signal and handle errors with throw, try, and catch. Write exception-safe code using RAII, mark non-throwing functions noexcept, and return meaningful exit codes.
The STL: Containers & Iterators
The Standard Template Library’s workhorses: vector and string, associative containers (map, set, unordered_map), and the iterators and streams that tie them together.
STL Algorithms & Idioms
Do more with less code: the <algorithm> library (sort, find, transform, accumulate) driven by lambdas, the erase-remove idiom, and a first look at ranges.
Templates & Generic Programming
Write code that works for any type: function and class templates, full and partial specialization, variadic templates, and constraining types with type traits, SFINAE, and concepts.
Move Semantics & Modern Idioms
Avoid needless copies with move semantics and rvalue references, then apply the idioms that shape real C++: copy-and-swap, non-copyable types, Pimpl, and CRTP.
Multithreading
Run work in parallel with std::thread, protect shared data with mutexes and atomics, and coordinate threads using futures and condition variables.
Building Real Projects: CMake, Libraries & Testing
Ship real C++: describe a build with CMake, pull in dependencies with vcpkg or Conan, write unit tests with GoogleTest, and debug with gdb and sanitizers.