Skip to content

yadereve/cpp_modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPP Modules

This repository contains exercises from the CPP Modules, a series of projects designed to teach object-oriented programming in C++ at 42 School. The modules cover fundamental and advanced C++ concepts, encouraging good coding practices and deep understanding of the language.

📌 Overview of CPP Modules

CPP Module 00 - Basics of C++

  • Introduction to C++
  • I/O streams (std::cout, std::cin)
  • namespace, iostream, std::string
  • The difference between new and delete
  • Creating and destroying objects

CPP Module 01 - Memory and Pointers

  • Understanding memory allocation and references
  • The this pointer
  • File streams (ifstream, ofstream)
  • Passing by reference vs. passing by value

CPP Module 02 - Ad-hoc Polymorphism, Operator Overloading

  • Introduction to class-specific operators (operator overloading)
  • Fixed-point arithmetic
  • Copy constructor and assignment operator

CPP Module 03 - Inheritance

  • Understanding inheritance (public, protected, private)
  • Base class and derived class
  • Virtual functions and polymorphism

CPP Module 04 - Abstract Classes and Interfaces

  • Pure virtual functions
  • Abstract classes
  • Implementation of interfaces
  • Understanding destructors in inheritance

CPP Module 05 - Exception Handling

  • Handling errors using try, catch, and throw
  • Standard exceptions (std::exception)
  • Creating custom exceptions

CPP Module 06 - C++ Type Conversions

  • Implicit and explicit conversions
  • Scalar type conversion
  • reinterpret_cast and dynamic_cast

CPP Module 07 - Templates

  • Introduction to C++ templates
  • Function templates and class templates
  • Implementing generic programming concepts

CPP Module 08 - Templated Containers, Iterators, Algorithms

  • Understanding STL (Standard Template Library)
  • std::vector, std::list, std::map
  • Iterators (begin(), end(), find())
  • Algorithm functions (sort(), reverse(), etc.)

CPP Module 09 - Mutant Stack & Advanced STL

  • Understanding the stack container
  • Custom iterators
  • Creating a MutantStack class with iterators

🚀 Getting Started

  1. Clone the repository:
    git clone https://github.com/yourusername/cpp-modules.git
    cd cpp-modules
  2. Compile and run a module:
    make
    ./program_name
  3. Clean the compiled files:
    make fclean

📜 License

This project follows the 42 School guidelines and is for educational purposes only.

Happy coding! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages