Skip to content

aphonogelia/cpp-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42 C++ Modules (CPP00 → CPP09)

🎏 Overview

This repository contains the 10 C++ modules from the 42 school curriculum. The goal is to progressively master C++ fundamentals under the C++98 standard, moving from procedural C-style thinking to advanced Object-Oriented Programming (OOP).


🪭 Global Skills Acquired

  • OOP: Encapsulation, inheritance, polymorphism, abstraction.
  • Memory Management: Stack vs heap, avoiding leaks, RAII.
  • C++ Idioms: Orthodox Canonical Form, operator overloading, exception safety.
  • Generic Programming: Templates, reusability.
  • STL Mastery: Containers, iterators, algorithms.

〽✍🏾 Notes

  • Standard: All projects follow the C++98 standard (42 requirement).
  • Constraints: No external libraries; focus on understanding fundamentals over modern shortcuts.
  • Documentation: Includes the documented learning process and solved challenges.

🕵️‍♀️ Modules Breakdown

  • Concepts: Namespaces (std), I/O streams, classes, member functions, this pointer, static members.
  • Takeaway: Transition from C to C++, object-oriented thinking.
  • Concepts: Stack vs heap, new/delete, pointers vs references, file I/O.
  • Takeaway: Memory management and avoiding leaks.
  • Concepts: Constructors/destructors, copy constructor, copy assignment operator, operator overloading.
  • Takeaway: Rule of 3 and object copying semantics.
  • Concepts: Base/derived classes, method overriding, access specifiers, constructor/destructor chaining.
  • Takeaway: Code reuse and hierarchical design.
  • Concepts: Virtual functions, dynamic binding, abstract classes, deep vs shallow copy.
  • Takeaway: Runtime polymorphism and interface-based design.
  • Concepts: try/catch/throw, custom exception classes, RAII.
  • Takeaway: Robust error handling.
  • Concepts: static_cast, dynamic_cast, reinterpret_cast, const_cast.
  • Takeaway: Explicit and safe type conversions.
  • Concepts: Function templates, class templates, generic programming.
  • Takeaway: Reusable, type-independent code.
  • Concepts: vector, list, iterators, std::find, std::sort.
  • Takeaway: Efficient use of STL.
  • Concepts: map, set, data processing algorithms.
  • Takeaway: Combining STL tools for problem solving.
  • Highlight: ex02 — PmergeMe — implementation of the Ford-Johnson merge-insertion sort with detailed complexity analysis.

🦧 Structure & Build

  1. Clone the repository:

    git clone git@github.com:aphonogelia/CPP.git
  2. Navigate to an exercise:

    cd CPP00/ex00
  3. Compile and Run:

    make
    ./executable_name

🔗 Links

Releases

No releases published

Contributors

Languages