This repository contains my solutions to the 42 Network C++ Modules (00–09).
The modules progressively introduce core concepts of C++ (C++98) — from the basics (classes, namespaces, I/O) to more advanced topics like inheritance, polymorphism, exceptions, casts, templates, and STL fundamentals.
The goal is not only to complete the exercises, but to build a strong understanding of how C++ works and how to write clean, maintainable OOP code.
| Module | Focus | Key topics |
|---|---|---|
| cpp00 | Basics | namespaces, classes, member functions, iostream |
| cpp01 | Memory & references | new/delete, references vs pointers, file streams |
| cpp02 | Ad-hoc polymorphism | operator overloading, canonical form |
| cpp03 | Inheritance | base/derived classes, constructor/destructor chain |
| cpp04 | Polymorphism | virtual functions, abstract classes, interfaces |
| cpp05 | Exceptions | try/catch, custom exceptions |
| cpp06 | Casts | static_cast, dynamic_cast, conversions |
| cpp07 | Templates | function & class templates |
| cpp08 | STL intro | containers, iterators, basic algorithms |
| cpp09 | Mixed advanced usage | combining concepts, algorithms practice |
Cpp-Modules/
├── cpp00/
├── cpp01/
├── cpp02/
├── cpp03/
├── cpp04/
├── cpp05/
├── cpp06/
├── cpp07/
├── cpp08/
├── cpp09/
└── README.md
Each module typically contains:
- exercise folders (
ex00,ex01, ...) - a
Makefile - subject-compliant
*.cpp/*.hppfiles
All exercises are designed for C++98.
# Example: compile an exercise
cd cppXX/exYY
make
# Run
./<program>The executable name depends on the exercise/Makefile.
- C++98 only (per 42 subject)
- no external libraries unless explicitly allowed
- Makefile required for each exercise
- focus on correctness, clean design, and avoiding leaks (where applicable)
Built as part of the 42 Network curriculum
by Othmane Elliq