This repository contains solutions for the 42 School Curriculum C++ Modules, a structured learning path designed to introduce and develop proficiency in Object-Oriented Programming (OOP) with C++. Each module focuses on a specific aspect of the language, gradually increasing in complexity and introducing key programming paradigms such as memory management, polymorphism, and the Standard Template Library (STL).
- Module 00 - Basics: Namespaces, Classes, Member Functions, Static, Const
- Module 01 - Memory Allocation, Pointers, References, Switch Statements
- Module 02 - Ad-hoc Polymorphism, Operator Overloading, Canonical Form
- Module 03 - Inheritance
- Module 04 - Subtype Polymorphism, Abstract Classes, Interfaces
- Module 05 - Exceptions and Repetition
- Module 06 - Type Conversions and Casting
- Module 07 - C++ Templates
- Module 08 - STL, Iterators, and Algorithms
- Module 09 - Advanced STL Operations
- C++ Standard: All projects comply with C++11 or higher.
- Compilation:
- Uses
c++
with-Wall -Wextra -Werror
flags.
- Uses
- Code Structure:
- Class names follow
UpperCamelCase
convention. - Header files (
.hpp
) include necessary dependencies and include guards.
- Class names follow
- Memory Management:
- Properly allocates and frees heap memory.
- Prevents memory leaks.
- Error Handling:
- Implements exceptions where necessary.
- Ensure robust input validation.
Clone the repository and navigate to the desired module:
git clone https://github.com/ejarvinen/42CPP_Modules.git
cd 42CPP_Modules/CPPXX/ex0X
make
Execute the compiled program:
./program-name
- Introduction to C++ syntax and fundamental concepts.
- Implementing classes, member functions, and simple I/O operations.
- Dynamic memory allocation and deallocation.
- Understanding pointers and references.
- Overloading operators.
- Implementing the Orthodox Canonical Class Form.
- Implementing and extending base classes.
- Exploring derived class behaviors.
- Understanding pure virtual functions.
- Implementing abstract base classes.
- Handling errors using exception classes.
- Implementing
try
,catch
, andthrow
.
- Implementing explicit and implicit type casting.
- Understanding
static_cast
,dynamic_cast
,reinterpret_cast
, andconst_cast
.
- Implementing function and class templates.
- Utilizing generic programming for flexibility.
- Introduction to STL containers (
vector
,list
,map
). - Implementing iterators and algorithmic functions.
- More complex STL operations.
- Optimizing container performance and efficiency.