How juansfm/cpp42 works
Project type and purpose
• This is an educational monorepo for “C++ modules from 42.”
• It contains a series of standalone exercises (ex00, ex01, …) organized by module (CPP00, CPP01, … CPP09).
• Each exercise folder holds source code (.cpp/.hpp), a Makefile, and a main.cpp to demonstrate or test the exercise.
File structure
• Top level:
• .gitignore
• README.md (“# CPP42 – C++ modules from 42”)
• Directories: CPP00, CPP01, …, CPP09
• Under each CPPXX:
• ex00, ex01, … (one folder per exercise)
• Each exercise folder always has:
– Makefile (build instructions)
– .cpp and .hpp files (implementation and headers)
– main.cpp (entry point/testing)
• There is no shared “src” or “lib” beyond these per-exercise directories, nor any external services or databases.
README
• Very brief: confirms these are C++ module exercises for the 42 curriculum.
a. Main components:
• Repository (root)
• Module containers: CPP00, CPP01, … CPP09
• Inside each container: Exercise sub-modules (ex00, ex01, …)
• Build system: Makefiles invoking the C++ compiler
• Runtime: Console executable produced by each exercise’s Makefile
b. Relationships & interactions:
• Developer → modifies source files in an exercise folder
• Makefile → compiles source & headers → produces executable
• Executable → standard I/O (console)
• No cross-module code reuse (each exercise is independent)
c. Architectural patterns / principles:
• Monorepo of isolated, self-contained modules
• Convention-over-configuration: each exercise follows the same directory layout
• Reproducible builds via per-folder Makefiles
d. Key technologies:
• C++ (g++/clang++)
• Make (Makefiles)
• Git (version control)
Step-by-step for the principal software engineer
4. For a representative exercise, expand it:
– List source files (.cpp/.hpp)
5. “All exercises follow this pattern; none share code.”