This repository contains all the C++ modules from the 42 School Common Core. These projects are designed to introduce Object-Oriented Programming (OOP) concepts, memory management, and advanced C++98 features.
The repository is organized by modules, each containing several exercises:
- CPP00: Namespaces, classes, member functions, stdio streams, initialization lists, static, const.
- CPP01: Memory allocation, pointers to members, references, switch statement.
- CPP02: Ad-hoc polymorphism, operator overloading, Orthodox Canonical class form.
- CPP03: Inheritance.
- CPP04: Subtype polymorphism, abstract classes, interfaces.
- CPP05: Repetition and Exceptions.
- CPP06: C++ Casts (static_cast, dynamic_cast, reinterpret_cast, const_cast).
- CPP07: C++ Templates.
- CPP08: Templated containers, iterators, algorithms.
- CPP09: STL (Standard Template Library) Advanced Containers.
Each exercise (exXX) has its own Makefile and source files.
You can build all modules at once using the global Makefile at the root of the repository, or build each exercise individually.
# Compile all exercises in all modules
make all
# Clean object files
make clean
# Clean object files and binaries
make fclean
# Recompile everything
make recd CPP00/ex00
make
./megaphone "Hello World"According to the Antigravity Global Engineering Constitution:
- Zero Leaks: All heap allocations (
new,new[]) are strictly paired with (delete,delete[]). Verified withValgrind. - Standard Compliance: Compiled strictly with
-Wall -Wextra -Werror -std=c++98. - Makefiles: Every project contains a highly robust Makefile supporting
all,clean,fclean, andrerules. No unnecessary relinking. - Continuous Integration: GitHub actions automatically build and verify code integrity upon every push.