C++ concept guides
Build a mental model before your next puzzle. Learn references, pointers, object lifetime, data structures and algorithms through code examples, common mistakes and short interactive checks.
- Fundamentals · Getting started
C++ first steps
Start with names, stored numbers and reading one instruction at a time.
- Functions · Getting started
Functions and copies
Follow a function call, its separate input number and the result it sends back.
- Functions · Language foundations
References
Another name for an object. Follow what changes in the caller.
- Pointers · Memory & ownership
Pointers
Separate an address from the object it leads to.
- Memory · Memory & ownership
RAII & resource lifetime
Make cleanup part of an object’s lifetime.
- Memory · Memory & ownership
Stack vs heap
Separate where an owner lives from how long its object lives.
- OOP · Objects & interfaces
Inheritance
Reuse a shared interface and behavior while keeping the relationship honest.
- OOP · Objects & interfaces
Polymorphism
One interface can call behavior supplied by different object types.
- OOP · Objects & interfaces
Virtual functions
Separate dynamic dispatch from the compiler’s override check.
- Data Structures · Data structures
Linked lists
Follow links, reason about reachability, and separate unlinking from deletion.
- Data Structures · Data structures
Stacks & queues
Choose what leaves next: the newest item or the oldest.
- STL · Data structures
Vectors
Distinguish existing elements, spare storage, and invalidated addresses.
- Functions · Algorithms & reasoning
Recursion
Follow smaller calls down and returned answers back up.
- Big-O · Algorithms & reasoning
Big O & growth
Count growing work, then compare how it scales with input size.