The CPP Module project is part of the curriculum at 42 São Paulo. This project aims to deepen the understanding of C++ programming by exploring advanced concepts and features of the language, such as object-oriented programming, templates, exception handling, and more.
This project is divided into several modules, each focusing on different aspects of C++:
- Module00: Basics of C++ (namespaces, classes, member functions, stdio streams, initialization lists, static, const, and more);
- Module01: Memory Allocation (new, delete, pointers to members, references, file streams);
- Module02: Ad-hoc Polymorphism, Operators Overloading;
- Module03: Inheritance;
- Module04: Subtype Polymorphism, Abstract Classes, Interfaces;
- Module05: Repetition and Exceptions;
- Module06: C++ Casts;
- Module07: Templates;
- Module08: Templated Containers, Iterators, Algorithms;
- Module09: Repetition and Containers.
- A C++ compiler supporting C++98 standard.
- Make utility for building the project.
Each module comes with a Makefile to ease the compilation process. Navigate to the module directory and run the following command in the terminal:
makeThis will compile the project and generate the executable file.
To clean up the object files generated during compilation:
make cleanTo clean all generated files, including the executable:
make fcleanTo recompile the project from scratch:
make reAfter compiling the project, run the generated executable from the terminal:
./module_executableor you can run with valgrind using:
make runEach module may have specific instructions on how to use and test the features implemented. Refer to the module's README or documentation for detailed usage.
The project directory structure is organized as follows:
cpp_42sp/
├── module00/
│ ├── includes/
│ │ └── example.hpp
│ ├── srcs/
│ │ ├── main.cpp
│ │ └── example.cpp
│ ├── Makefile
│ ├── README.md
├── module01/
│ ├── includes/
│ │ └── another_example.hpp
│ ├── srcs/
│ │ ├── main.cpp
│ │ └── another_example.cpp
│ ├── Makefile
│ ├── README.md
├── ...
├── LICENSE
└── README.md- module00/, module01/, ...: Directories for each module containing their respective source code, headers, and Makefiles;
- includes/: Contains the header files;
- srcs/: Contains the source code files;
- Makefile: Build script for the module;
- README.md: Documentation for the module;
- LICENSE: License file for the project.
Contributions are welcome! If you want to contribute to this project, please follow the steps below:
- Fork the project;
- Create a branch for your feature (git checkout -b feature/new-feature);
- Commit your changes (git commit -am 'Add new feature');
- Push to the branch (git push origin feature/new-feature);
- Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.