C++ From the Ground Up
Start from zero: what C++ pointers are, stack vs heap memory, how function calls use the stack, and common memory errors to avoid.
Curriculum (6 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).
Follow the call stack as main calls a function, a local variable is created, and the stack frame is pushed and popped.
Identify C++ Memory Errors
practiceGiven code snippets, identify whether the error is a memory leak, dangling pointer, stack overflow, or double-free.
Pointers vs References vs Values
interviewsThe trade-offs between passing by value, by pointer, and by reference — semantics, performance, and null safety.