C++ CPP study materials
C++ CPP study resources

C++ CPP cheat sheet

C++ CPP · Keep the key ideas within reach.

Quick reference

C++ standard containers, iterators and algorithm contracts

  • Choose containers by actual operations and invalidation rules.

  • Respect half-open ranges and required iterator categories.

  • Remove/unique do not themselves erase container storage.

  • Sorting/searching and complexity claims require explicit preconditions.

Quick reference

C++ templates, callable objects, streams and exceptions

  • Template deduction follows the declared parameter relationships.

  • Value/reference capture and move casts do not imply identical side effects.

  • Stream formatting and failure state require actual context.

  • Reference catching and bare rethrow preserve different information from value copies.

Quick reference

C++ types, expressions, functions and control flow

  • Version, type, grouping and sequencing assumptions determine a trace.

  • Compiler output does not define undefined behavior.

  • Follow loop/switch control transfers explicitly.

  • Value, reference and pointer interfaces have distinct effects.

Quick reference

C++ object lifetime, ownership, classes and polymorphism

  • A pointer is not proof of valid lifetime or ownership.

  • RAII ties owned-resource cleanup to object lifetime.

  • Allocation/deallocation forms and polymorphic deletion must match the rules.

  • Virtual dispatch, hiding and access control are distinct.