Welcome to my C++ journey!
This project is part of the 42 Common Core curriculum, designed to build a strong foundation in C++ programming—from understanding the basics to writing professional-level code. Over the course of these modules, I explored core C++ features and object-oriented programming concepts that are essential to mastering the language.
I started by learning the fundamentals—how to define and work with classes and objects, use constructors and destructors, and control access using specifiers. As the modules progressed, I dived deeper into memory management with references and pointers, implemented custom types and operator overloading, and explored advanced topics like inheritance, polymorphism, exception handling, and template programming.
This project is structured to guide you step-by-step through each essential C++ topic. By the end, you'll not only grasp how to write clean, efficient, and safe C++ code, but also understand when and why to use different language features—preparing you for real-world development challenges.
Covers the basics of object-oriented programming: classes, objects, encapsulation, member functions, and access specifiers. Introduces constructors, destructors, and static members.
Explores memory management fundamentals, including the use of references vs. pointers, dynamic memory allocation, and const correctness.
Introduces fixed-point arithmetic and operator overloading. You'll implement a custom Fixed class and practice overloading operators such as +, -, *, /, and comparison operators.
Teaches inheritance and the relationship between base and derived classes. Covers constructors/destructors in inheritance and visibility specifiers.
Builds on Module 03, introducing polymorphism, virtual functions, abstract classes and pure virtual methods.
Focuses on exception handling and abstract class design. Implements a bureaucratic workflow to showcase abstract classes, exceptions, and polymorphism.
Delves into C++ casting mechanisms including static_cast, dynamic_cast, const_cast, and reinterpret_cast, with practical use cases.
Covers generic programming using templates. Teaches how to write function and class templates, as well as template specialization.
Introduces the Standard Template Library (STL), sequence containers like vector, associative containers like map, and how to use iterators with standard algorithms.
Explores performance optimization with STL, implementing a Bitcoin exchange parser, a Reverse Polish Notation calculator, and hybrid merge-insertion sorting.
Each module contains its own directory and set of exercises. To compile any of the C++ files:
c++ -Wall -Wextra -Werror -std=c++98 filename.cpp -o executableOr use a Makefile if provided:
makeAfter compilation, simply run the executable:
./executableSome modules include interactive prompts or input files. Follow the instructions in each module’s README or exercise description.