This repository contains the C++ (CPP) modules completed as part of the curriculum at 42 School. Each module consists of a series of exercises designed to reinforce and expand my knowledge of C++ programming concepts.
Module 00 - Namespace, class, member functions, stdio stream, initialization lists, static
- ex00 - String manipulation and command-line argument handling
- ex01 - Classes, Object instantiation, Basic I/O, String manipulation
- ex02 - File recreation, C++ programming, Object-oriented design
Resources:
- OOP in CPP: GeeksforGeeks
- std::cin.getline() vs. std::cin: Stack Overflow
- atoi() in cpp strings: Stack Overflow
- string.length() vs. string.size(): Stack Overflow
- Constructors in CPP: GeeksforGeeks
- Destructors in CPP: GeeksforGeeks
- C++: cin.getline - no instance of overload function: Stack Overflow
- C++ iomanip Library: YouTube
Module 01 - Memory allocation, References, Pointers to members, File streams
-
ex00 - Classes, Member Functions, Pointers, Memory Allocation (stack vs. heap), Destructors
-
ex01 - Arrays of Objects, Memory Allocation (array of objects), Object Initialization
-
ex03 - Composition, Aggregation, Object Relationships, Constructors, Setters
-
ex05 - Member Functions, Pointers to Member Functions, Enumeration, Logging
-
References in CPP: GeeksforGeeks
-
Pointer to member functions: CodeGuru
-
C++ Pointers - GeeksforGeeks: GeeksforGeeks
-
How to Read File Line by Line in C++: Medium
-
C++ File Handling: How to Open, Write, Read, Close Files in C++: Guru99
Module 02 - Ad-hoc polymorphism, operators overload, and canonical classes
-
ex01 - Constructors (from int and float), Member Functions (toFloat, toInt), Operator Overloading
-
ex03 - Binary Space Partitioning (BSP), Fixed-point arithmetic, Triangle Point Inclusion Test
-
Introduction to Fixed Point Number Representation: CS61c Spring 2006
-
Back To Basics! Fixed Point Numbers in C++: YouTube
-
Understanding and Using Floating Point Numbers : Cprogramming
-
Printing floating point numbers - Cprogramming.com: Cprogramming.com
-
Copy Constructor in C++ - GeeksforGeeks: GeeksforGeeks
-
Overloading the assignment operator - LearnCpp.com: LearnCpp.com
-
Floating and fixed point representation in C++: Medium
-
Fixed Point Notation Basics : YouTube
-
Decimal to Floating Point Conversion : YouTube
-
IEEE 754 Standard for Floating Point Binary Arithmetic : YouTube
-
OPERATORS and OPERATOR OVERLOADING in C++ : YouTube
-
Overloading Increment and Decrement Operators in Postfix form : YouTube
-
Overloading ++ for both pre and post increment : stackoverflow
-
Check if a point lies inside a triangle : YouTube
Module 03 - Inheritance
- ex00 - Class implementation
- ex01 - Inheritance, Constructors/Destructors Chaining, Overriding Member Functions
- ex02 - Inheritance, Constructors/Destructors Chaining, Overriding Member Functions
- ex03 - Diamond Problem, Multiple Inheritance, Constructors/Destructors Chaining, Accessing Attributes and Member Functions from Parent Classes
Module 04 - Subtype polymorphism, abstract classes, interfaces
- ex00 - Polymorphism, Inheritance, Virtual Functions
- ex01 - Memory Management, Deep Copy
- ex02 - Abstract Classes
- ex03 - Interfaces / Pure Abstract Classes
- Polymorphism in C++ | Compile time vs Run time Polymorphism: YouTube
- C++ Subtype Polymorphism and Virtual Functions: YouTube
- Virtual Functions & Abstract Classes in C++: YouTube
- Abstract Classes And Pure Virtual Functions: YouTube
- Declare abstract class in c++: stackoverflow
- C++ Programming/Classes/Abstract Classes/Pure Abstract Classes: Wikibooks
- What is the difference between abstract class and pure abstract class in C++?: stackoverflow
- Interfaces in C++ (Pure Virtual Functions: YouTube
- Interfaces in C++ (Pure virtual functions): YouTube
- C++ Programming: Abstract and Interface Classes: YouTube
- Abstract Class vs Pure Abstract Class | Interface | OOP C++: YouTube
- What are Forward declarations in C++: geeksforgeeks
- What are forward declarations in C++?: stackoverflow
- C++ : How to copy / clone a STL List or Sub List: thispointer
Module 05 - Try/Catch and Exceptions
- ex00 - Exception handling, class design
- ex01 - Exception handling, class design, member functions
- ex02 - Abstract classes, inheritance, polymorphism, execution logic
- ex03 - Factory method, class design, string manipulation
- Exception Handling - C++ Tutorial For Beginners NeuralNine
- Throwing Exceptions in C++ RollBar
- Exception handling in C++ (How to handle errors in your program?) CodeBeauty
- C++ Nested Try Catch statements | Re throwing Exceptions LearningLad
- How to Implement Custom Exceptions in C++ Rollbar Editorial Team
- std::exception cppreference
- Intermediate-Advanced C++ 3: Custom Exceptions Cave of Programming
- How to Create a Random Number Generator in C++ digitalocean
- C++ Files w3schools
- Is this really 50/50 chance? cplusplus
- Declaring an array of functions inside a class stackoverflow
- Factory Method in C++, the Right Way medium
Module 06 - C++ casts
- Type Conversion in C++ scaler
- Type Conversions in C++ Neso Academy
- Type Punning in C++ The Cherno
- Casting in C++ The Cherno
- std::string::find_first_not_of cppreference
- strtof, strtod, strtold cppreference
- C++ Casting - Part 3 - static_cast and dynamic_cast (mega lesson) | Modern Cpp Series Mike Shah
- C++ Casting - Part 4 - static_cast vs dynamic_cast (Interview Question) Mike Shah
- C++ Casting - Part 5 - reinterpret_cast | Modern Cpp Series Mike Shah
- What is the uintptr_t data type? stackoverflow
- dynamic_cast conversion cppreference
Module 07 - C++ templates
- C++ Function Template programiz
- C++ Class Templates programiz
- Overloading Subscript or array index operator [] in C++ geeksforgeeks
- Why use a "tpp" file when implementing templated functions and classes defined in a header? stackoverflow
- Candidate template ignored: deduced conflicting types for parameter: <const T &> vs <T &> stackoverflow
Module 08 - Templated containers, iterators, algorithms
- ex00 - Function templates, container manipulation, exception handling
- ex01 - std::max, std::min, std::sort exceptions, iterators
- ex02 - Iterators, template specialization
- Back To Basics: C++ Containers javidx9
- Back to Basics: Classic STL - Bob Steagall - CppCon 2021 CppCon
- The C++ Standard Template Library (STL) geeksforgeeks
- Containers cplusplus
- C++ Vectors programiz
- std::max cppreference
- std::sort cppreference
- How do I find the max element in a vector (C++)? stackoverflow
- std::stack cppreference
Module 09 - STL
- ex00 - File manipulation, std::map, time parsing
- ex01 - Reverse Polish Notation, std::stack, input parsing
- ex02 - Merge sort algorithm, std::vector, std::deque, input parsing
- Substring in C++ geeksforgeeks
- C++ parse date/time with microseconds stackoverflow
- std::ifstream::ifstream cplusplus
- std::map one key, two values stackoverflow
- static template functions in a class stackoverflow
- **Reverse Polish Notation and The Stack ** Computerphile
- What is Reverse Polish Notation (AKA Postfix Notation)? Why is it Important? Gary Explains
- calculating execution time in c++ stackoverflow
-
Clone this repository:
git clone github.com/snowhp/CPP-Modules
-
Navigate to the desired module/exercise directory:
cd CPP00/ex00
-
Compile and run your program:
make ./PROGRAM_EXECUTABLE_NAME (Depends on the exercise most are default [a.out] or the number of the exercise [ex00])
Feel free to send questions or improvements for module exercises.