๐น๏ธ Practice arcade
Extra games, not extra homework โ timed sprints, survival runs that end when your lives run out, and mastery drills built from the same skills C++ teaches.
โก Sprints
Beat the clock.
๐ Bug-Hunt Time Trial
Two minutes. Each function has one bad line: an off-by-one, a stray semicolon, = where == was meant, an integer division. Find it.
โก Trace It
Count a loop's passes and predict what integer / and % print, negatives included.
โ Operator Sprint
Precedence, integer averages, short-circuit && and ||, and switch fall-through. Evaluate it before the compiler does.
๐ Standard Library Sprint
Map lookups, count_if and accumulate, lambda captures, view pipelines, and the right container for the job.
๐ Survival
Each miss costs a life โ lose them all and the run ends.
๐ Memory Bug Survival
new versus new[], a string_view of a temporary, a reference kept across push_back. Three misses and the run crashes.
โ ๏ธ Defined or Not?
Undefined, unspecified, implementation-defined, or fully defined: name what the standard promises. Three wrong beliefs and the run ends.
๐ At the C Boundary
c_str, extern "C", malloc and free, and owning a C handle: three wrong crossings and the run crashes.
๐งฉ Works on My Machine
Imported targets, which step reported the error, versions and vendoring. Three wrong calls and the build breaks for everyone else.
๐ฐ๏ธ Old Way, Modern Way
NULL, new and delete, #define, C casts, printf and std::bind: name the modern replacement. Three legacy habits and the run ends.
๐ช Copy or Alias?
Vectors, references and parameters: know which name changes which object, and which index is past the end. Three misses and you're out.
๐ Pointer Survival
p + k, *p + k, pointer differences and re-seated pointers, counted in elements. Three misses and you're out.
๐ฏ Mastery
No clock โ just get N in a row.
๐งฐ Which Tool Catches It?
Warnings, a static analyzer, a sanitizer, or the debugger: sort each bug to the cheapest tool that catches it first.
๐ Stream and Mode
ifstream or ofstream, truncate or append, text or binary: open five files right in a row.
๐ How Does It Grow?
Read a loop's shape and name its growth, from O(1) to O(nยฒ), five times in a row.
๐ฆ Ship a Library
Which file each system builds, and where each loader looks for it: name five in a row on Linux, macOS and Windows.
๐งช Pass, Fail, or Not Run?
-R or -L, --output-on-failure, WILL_FAIL and PASS_REGULAR_EXPRESSION: call five ctest runs right in a row.
๐๏ธ Design Review: tasks
Library or main, optional or throw, exit code 1 or 2, and the portable choice: defend the capstone's design five times in a row.
๐ฉ Flag for the Job
-g or -O2, which sanitizer, which warning, which build type, and which CMake step: pick five flags right in a row.
๐ Loop Tracer
while, do-while, break and continue: trace five loops in a row without an off-by-one.
๐งญ Calls and Scopes
Which overload wins, which default fills in, which x a block sees, and when each local is destroyed.
๐๏ธ Build and Tear Down
Members, bases, stack unwinding, unique_ptr ownership and copy-vs-move counts: who is built, moved and destroyed, in what order.
๐ฏ Who Handles It?
Which catch runs, which expected branch, which virtual override, and what T deduces to.
๐ ๏ธ Build It Right
Compile, link, runtime or logic error? PRIVATE, PUBLIC or INTERFACE? Read the build like a maintainer.