Fatih Çil

Self-Taught Developer

Software Engineer

Programmer

Game Developer

Fatih Çil

Self-Taught Developer

Software Engineer

Programmer

Game Developer

Blog Post

C++ Modules: From C to C++98, the 42 Way

November 30, 2022 École 42

Hi! After almost a year of pure C, the cursus switches languages: nine C++ modules (00 through 08), all restricted to C++98. No auto, no smart pointers, no range-for — you learn the language from its foundations.

The progression

  • 00–01: classes, member functions, references vs pointers, stack vs heap lifetimes,
  • 02: operator overloading and the orthodox canonical form (constructor, copy, assignment, destructor — written so many times it becomes muscle memory),
  • 03–04: inheritance, virtual functions, abstract classes and why destructors must be virtual,
  • 05: exceptions done properly, with a bureaucracy simulation of forms and signatures,
  • 06: the four casts and type conversions,
  • 07: templates from scratch,
  • 08: templated containers and iterators — a warm-up for ft_containers.

Looking back

Coming from C, the most valuable shift was thinking in ownership and invariants instead of raw memory: who constructs, who copies, who frees. That mindset transferred directly to my later C++ work (ft_irc) and even to C# in Unity — the names change, the discipline does not. All nine modules are in my 42Cursus repository.

42 C++ modules badge

Related Posts