A progression through 10 C++ modules (CPP00–CPP09) from the 42 school curriculum. Each module introduces key C++ concepts, building from basic object-oriented programming all the way to the Standard Template Library (STL).
CPP-Modules/
├── CPP00/ # Namespaces, classes, basic I/O
├── CPP01/ # Memory allocation, references, pointers
├── CPP02/ # Operator overloading, Orthodox Canonical Form
├── CPP03/ # Inheritance
├── CPP04/ # Polymorphism, abstract classes, interfaces
├── CPP05/ # Exceptions
├── CPP06/ # C++ casts
├── CPP07/ # Templates
├── CPP08/ # Templated containers, iterators, algorithms
└── CPP09/ # STL in practice
Each module folder contains numbered exercise sub-folders (ex00, ex01, …), each with its own Makefile and source files.
Navigate to any exercise directory and use the following make targets:
cd CPP0X/exYY
make # Compile the exercise (produces the binary)
make re # Force full recompilation (fclean + all)
make clean # Remove compiled object files (.o)
make fclean # Remove object files and the compiled binaryExample — build and run CPP00 ex00:
cd CPP00/ex00
make
./megaphone "hello world"All exercises are compiled with
c++ -Wall -Wextra -Werror -std=c++98.
| Module | Core Concepts |
|---|---|
| CPP00 | Namespaces, classes, member functions, basic I/O |
| CPP01 | Memory allocation (new/delete), pointers, references |
| CPP02 | Operator overloading, Orthodox Canonical Form, fixed-point numbers |
| CPP03 | Inheritance (single & multiple, diamond problem) |
| CPP04 | Subtype polymorphism, abstract classes, interfaces |
| CPP05 | Exception handling (try/catch/throw) |
| CPP06 | C++ casts (static_cast, reinterpret_cast, dynamic_cast) |
| CPP07 | Function and class templates |
| CPP08 | STL containers, iterators, algorithms |
| CPP09 | STL in practice (map, stack, deque, Ford-Johnson sort) |
Each module's README.md lists the exercises and the concept each one focuses on. A typical workflow:
- Read the module
README.mdfor context. - Enter the exercise directory (
cd CPP0X/exYY). - Study the source files, then
makeand run the binary. - Use
make fcleanbefore moving to the next exercise.