How the labs work
C++ Labs are hands-on coding challenges that take you from the basics to complete projects, one small step at a time.
Every lab compiles and runs C++17 right in your browser, so there is nothing to install. For each lab:
- Read the task, the input and output rules, and the example.
- Write your code in the editor and press Run to try it.
- Press Check to test it against hidden test cases. Your output must match exactly.
- Stuck? Read the hints, then open Show solution for a full explanation.
Start with the first lab: Hello, World! →
Chapters
- 01 · Output with cout (7 labs)
- 02 · Variables & Types (6 labs)
- 03 · Input & Arithmetic (6 labs)
- 04 · Strings (7 labs)
- 05 · Conditions (6 labs)
- 06 · Loops (8 labs)
- 07 · Functions & References (7 labs)
- 08 · Recursion (6 labs)
- 09 · Vectors (7 labs)
- 10 · 2D Vectors (5 labs)
- 11 · Pointers & Memory (5 labs)
- 12 · Structs (5 labs)
- 13 · Classes (6 labs)
- 14 · Constructors & Lifetime (6 labs)
- 15 · Operator Overloading (5 labs)
- 16 · Inheritance & Polymorphism (5 labs)
- 17 · Templates (5 labs)
- 18 · STL Containers (6 labs)
- 19 · STL Algorithms & Lambdas (7 labs)
- 20 · Stacks, Queues & Heaps (6 labs)
- 21 · Iterators & std::function (5 labs)
- 22 · Algorithms (6 labs)
- 23 · Modern C++17 (6 labs)
- 24 · Projects (6 labs)