Welcome to the comprehensive collection of 42 C++ Modules projects, covering modules 00 through 09. This repository contains the full progression of C++ projects from the 42 school curriculum, designed to teach modern C++ concepts, syntax, and best practices through hands-on assignments.
The 42 C++ Modules are a series of incremental projects designed to develop your skills in C++ programming from beginner to advanced levels. Each module focuses on specific C++ features such as classes, inheritance, polymorphism, templates, exceptions, operator overloading, and advanced algorithms.
- Understand the basic syntax and structure of C++ programs
- Learn how to compile and run simple programs
- Work with basic input and output streams
- Practice control flow using loops and conditionals
- Manipulate fundamental data types and variables
- Grasp the concept of classes and object instantiation
- Implement constructors and destructors for proper object lifecycle
- Use access specifiers (public, private, protected) for encapsulation
- Develop member functions and understand class methods
- Apply basic principles of object-oriented design
- Learn the Rule of Three/Five/Zero for safe resource management
- Implement copy constructors, assignment operators, and destructors
- Overload operators to customize class behavior (e.g., arithmetic, assignment)
- Understand ad-hoc polymorphism through operator overloading
- Avoid common pitfalls such as shallow copies and memory leaks
- Build inheritance hierarchies with base and derived classes
- Override virtual functions to enable runtime polymorphism
- Design abstract classes and interfaces for flexible code architecture
- Explore dynamic binding and virtual function tables
- Create polymorphic containers and manage heterogeneous objects
- Handle complex inheritance using virtual inheritance techniques
- Work with abstract base classes for enforcing interfaces
- Understand multiple inheritance and its challenges
- Ensure correct resource cleanup with virtual destructors
- Refine class hierarchies for extensibility and maintainability
- Revisit operator overloading for arithmetic, comparison, and stream operators
- Deepen understanding of exception handling with
try,catch, andthrow - Create custom exception classes for specialized error reporting
- Manage program flow and resource cleanup in the presence of exceptions
- Apply exception safety guarantees to maintain robust applications
- Master function and class templates for generic programming
- Learn template specialization and partial specialization
- Practice safe and effective type casting within template code
- Understand static, dynamic, const, and reinterpret casts
- Write reusable and flexible code leveraging template mechanisms
- Expand template skills to build templated containers and algorithms
- Implement generic algorithms that work with multiple data types
- Explore template metaprogramming basics and compile-time computation
- Learn to balance code flexibility with performance considerations
- Harness the power of the Standard Template Library (STL)
- Deep dive into STL containers and their iterator interfaces
- Create and use functors and callable objects effectively
- Utilize lambda expressions for concise and powerful inline functions
- Apply STL algorithms for searching, sorting, and transforming data
- Write clean, maintainable, and efficient code using modern C++ idioms
- Implement advanced algorithms such as the Ford-Johnson merge-insert sort
- Develop a Reverse Polish Notation (RPN) calculator
- Use STL containers like
vectoranddequeto manage data efficiently - Optimize performance through algorithmic improvements
- Demonstrate integration of learned concepts into practical projects
- C++ compiler (g++ or clang++) supporting C++98 and later standards
- Make utility (for building projects)
- Linux or macOS recommended (compatible with 42 school environment)
This repository is crafted as a comprehensive resource to deepen your understanding and mastery of C++ through hands-on projects aligned with the 42 curriculum.
Enjoy your C++ learning journey! 🚀