Pointers, References, and Raw Memory Arithmetic
Master low-level address calculation, pointer scaling, lvalue vs rvalue references, array-to-pointer decay, and strict const correctness.
Understanding of the C++ compilation model and process memory
Mastery of 64-bit raw pointer addresses, address arithmetic scaling, lvalue/rvalue references, and array decay.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 02.01Raw Pointers, Dereferencing, and Typed Address Arithmetic4 min
Deconstruct pointer mechanics: 64-bit addresses, dereferencing indirection (*), address-of (&), pointer scaling rules, and void* type erasure.
- 02.02Value Categories, Lvalue References, and Rvalue References4 min
Deconstruct C++ value categories (lvalue, prvalue, xvalue), reference binding rules, lifetime extension of temporaries, and rvalue references (&&).
- 02.03Stack Arrays, Array Decay, and Dynamic Heap Allocation4 min
Master C-style raw arrays, the array-to-pointer decay phenomenon, dynamic memory allocation with new/delete and new[]/delete[], and modern std::array alternatives.
- 02.04Const Correctness, Pointer Semantics, and Constexpr Mechanics4 min
Master const qualifiers: pointer-to-const vs const-pointer, const member functions, mutable escape hatches, and compile-time constexpr evaluation.
Ready to move on?
Calculate byte offsets for pointer arithmetic and explain reference collapsing rules.
Open the module self-check