Skip to content

mgarouj/42-CPP-Modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

143 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

42 School - C++ (CPP) Modules

This repository contains the C++ (CPP) modules completed as part of the curriculum at 42 School. Each module consists of a series of exercises designed to reinforce and expand my knowledge of C++ programming concepts, ranging from basic OOP to advanced STL algorithms.

πŸ“š Module List

Module 00 - Namespaces, Classes, & Std I/O

  • ex00: String manipulation and command-line argument handling.
  • ex01: Classes, Object instantiation, Basic I/O, String manipulation.
  • ex02: File recreation, C++ programming, Object-oriented design.

πŸ”— Resources


Module 01 - Memory Allocation, Pointers, & References

  • ex00: Stack vs. Heap memory allocation, Destructors.
  • ex01: Arrays of Objects, Memory Allocation (array of objects).
  • ex02: Pointers, References, Memory Addresses.
  • ex03: Composition, Aggregation, Object Relationships.
  • ex04: File I/O, Content copy, Error Handling.
  • ex05: Pointers to Member Functions, Enumeration.
  • ex06: Switch Statement, Filtering, Logging (Harl Filter).

πŸ”— Resources


Module 02 - Ad-hoc Polymorphism & Operator Overloading

  • ex00: Fixed-point numbers, Orthodox Canonical Form.
  • ex01: Constructors (int/float), Member Functions (toFloat, toInt), Operator Overloading.
  • ex02: Operator Overloading (Comparison, Arithmetic, Increment/Decrement), Static Member Functions (min, max).
  • ex03: Binary Space Partitioning (BSP), Fixed-point arithmetic, Triangle Point Inclusion Test.

πŸ”— Resources


Module 03 - Inheritance

  • ex00: Class implementation.
  • ex01: Inheritance, Constructors/Destructors Chaining.
  • ex02: Overriding Member Functions.
  • ex03: The Diamond Problem, Multiple Inheritance, Accessing Attributes from Parent Classes.

πŸ”— Resources


Module 04 - Subtype Polymorphism, Abstract Classes, Interfaces

  • ex00: Polymorphism, Inheritance, Virtual Functions.
  • ex01: Memory Management, Deep Copy vs Shallow Copy.
  • ex02: Abstract Classes.
  • ex03: Interfaces / Pure Abstract Classes.

πŸ”— Resources


Module 05 - Try/Catch & Exceptions

  • ex00: Exception handling, class design.
  • ex01: Custom exception classes, resource protection.
  • ex02: Abstract classes, inheritance, execution logic.
  • ex03: Factory method pattern, string manipulation.

πŸ”— Resources


Module 06 - C++ Casts

  • ex00: Type conversion, static_cast.
  • ex01: Serialization, reinterpret_cast.
  • ex02: Dynamic casting, type identification (dynamic_cast).

πŸ”— Resources


Module 07 - C++ Templates

  • ex00: Template functions (swap, min, max).
  • ex01: Iterating with templates.
  • ex02: Template classes.

πŸ”— Resources


Module 08 - Templated Containers, Iterators, Algorithms

  • ex00: Function templates, container manipulation.
  • ex01: std::max, std::min, std::sort, iterators.
  • ex02: Iterators, template specialization (Mutant Stack).

πŸ”— Resources


Module 09 - STL (Standard Template Library)

  • ex00: Bitcoin Exchange (File manipulation, std::map, date parsing).
  • ex01: Reverse Polish Notation (RPN), std::stack.
  • ex02: PmergeMe (Ford-Johnson merge sort algorithm), std::vector, std::deque.

πŸ”— Resources


πŸš€ Getting Started

Follow these steps to run the exercises on your local machine.

Prerequisites

  • GCC or Clang compiler
  • Make

Installation & Usage

  1. Clone the repository:
    git clone https://github.com/mohammedali1337/42-CPP-Modules.git

About

A comprehensive implementation of C++ Modules (C++98) covering OOP, STL, Templates, and Memory Management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors