Skip to content

Repository files navigation

⚙️ C++ Modules 00-09

All modules are fully implemented in strict C++98 as per 42 school requirements.

Step-by-step mastery of C++ concepts and OOP principles


💡 About the modules

All projects in this repository are developed using strict C++98 standard, without any newer language features.
The Orthodox Canonical Form (implementing default constructor, copy constructor, assignment operator, and destructor) is emphasized and required in Module 02 and onwards.

Below are short descriptions of each module (00 to 09):


🟦 Module 00: Basic C++ Syntax & OOP Introduction

Introduction to C++ syntax, data types, namespaces, and basic object-oriented programming. Focuses on understanding compilation, headers, and basic class structures.


🟦 Module 01: Memory Allocation & References

Covers dynamic memory allocation (heap vs stack), references, pointers, and basic resource management. Emphasizes the importance of constructors, destructors, and memory safety.


🟦 Module 02: Ad-hoc Polymorphism - Operator Overloading

Introduces operator overloading, function overloading, and basic usage of templates. Focuses on creating user-friendly classes and utilities with custom operators.


🟦 Module 03: Inheritance, Polymorphism, & Orthodox Canonical Form

Explores inheritance (single and multiple), access specifiers, and polymorphic behavior. Orthodox Canonical Form (default constructor, copy constructor, copy assignment operator, and destructor) is a key requirement for all main classes.


🟦 Module 04: Abstract Classes & Interfaces

Deep dive into abstract classes, pure virtual functions, interfaces, and runtime polymorphism. OCF compliance continues to be crucial for robust, reusable code.


🟦 Module 05: Exception Handling

Introduces C++ exception handling using try/catch blocks, custom exception classes, and safe error propagation. Emphasizes robust and maintainable code.


🟦 Module 06: Casts & Serialization

Covers type casting (static, dynamic, const, reinterpret), serialization basics, and safe conversions. Practices advanced manipulation of object types and memory.


🟦 Module 07: Templates & Iterators

Introduces class and function templates, STL containers, and iterators. Encourages generic programming and code reuse with type-safe abstractions.


🟦 Module 08: Templated Containers & Algorithms

Deepens understanding of STL containers (vector, stack, map, etc.) and standard algorithms. Focuses on efficient data manipulation and algorithm design in modern C++.


🟦 Module 09: Smart Pointers, Modern C++ Features & Ford-Johnson Algorithm

Explores smart pointers, resource management patterns, and implements the Ford-Johnson algorithm (Merge-Insertion Sort) as a main challenge. All solutions are crafted in C++98.


🛠️ Usage

Each module is a standalone project. To compile and run a module, navigate to its directory and use:

$ make
./<executable>

📚 What I Learned

  • C++ syntax and best practices under C++98 constraints
  • Orthodox Canonical Form (OCF) and its importance in class design
  • Object-oriented programming and design patterns
  • Memory management and resource safety
  • Exception handling and robust code structure
  • Advanced C++ features and STL usage
  • Ford-Johnson (Merge-Insertion) algorithm (Module 09) where I improved my coding skills implementing a complex algorithm

About

C++ modules project series to learn object oriented programming

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages