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.
- Introduction to C++
- I/O streams (
std::cout,std::cin) namespace,iostream,std::string- The difference between
newanddelete - Creating and destroying objects
- Understanding memory allocation and references
- The
thispointer - File streams (
ifstream,ofstream) - Passing by reference vs. passing by value
- Introduction to class-specific operators (
operator overloading) - Fixed-point arithmetic
- Copy constructor and assignment operator
- Understanding inheritance (
public,protected,private) - Base class and derived class
- Virtual functions and polymorphism
- Pure virtual functions
- Abstract classes
- Implementation of interfaces
- Understanding destructors in inheritance
- Handling errors using
try,catch, andthrow - Standard exceptions (
std::exception) - Creating custom exceptions
- Implicit and explicit conversions
- Scalar type conversion
reinterpret_castanddynamic_cast
- Introduction to C++ templates
- Function templates and class templates
- Implementing generic programming concepts
- Understanding STL (Standard Template Library)
std::vector,std::list,std::map- Iterators (
begin(),end(),find()) - Algorithm functions (
sort(),reverse(), etc.)
- Understanding the stack container
- Custom iterators
- Creating a
MutantStackclass with iterators
- Clone the repository:
git clone https://github.com/yourusername/cpp-modules.git cd cpp-modules - Compile and run a module:
make ./program_name
- Clean the compiled files:
make fclean
This project follows the 42 School guidelines and is for educational purposes only.
Happy coding! 🚀