C++ Intermediate
Automatic memory management with RAII, smart pointers, the STL containers and algorithms, and how function calls use the stack.
Curriculum (9 steps)
What Is a Pointer?
articlesA pointer is a variable that stores a memory address. Learn how pointers work, pointer arithmetic, and null pointers.
Understand the difference between stack memory (fast, automatic) and heap memory (dynamic allocation), and when to use each.
C++ Memory Layout
diagramsVisual map of C++ memory segments: text (code), data (globals), heap (dynamic), and stack (locals).
RAII and Smart Pointers
articlesHow Resource Acquisition Is Initialization prevents memory leaks, and how unique_ptr, shared_ptr, and weak_ptr manage ownership.
STL Containers and Algorithms
articlesstd::vector, std::map, std::unordered_map, std::set, iterators, and the algorithm functions that operate on them.
Follow the call stack as main calls a function, a local variable is created, and the stack frame is pushed and popped.
Follow the key state changes and boundary checks involved in what a function call places in a stack frame.
An interactive concept flow for what a function call places in a stack frame, from its assumptions through the main operation and boundary checks.