The cpp_modules_00-04
projects revolves around mastering advanced C++ concepts such as:
- Abstraction
- Encapsulation
- Simple and multiple inheritance
- Polymorphism
- Interfaces
- Fixed Point and Floating Point Number Representations
- Overload Operators
- Compile your code using
c++
with flags-Wall
-Wextra
-Werror
-std=c++98
- Exercise directories:
ex00
,ex01
, ...,exn
- Separate
Makefile
within each exercise directory. - Use
UpperCamelCase
for class names.
- Functions:
*printf()
,*alloc()
,free()
- External libraries like
C++11
,Boost
- Using
namespace <ns_name>
andfriend
keywords. - Until you reach the Module 08:
STL
, meaning no Containers (vector
list
map
and so forth) and no Algorithms (anything that requires to include the<algorithm>
header). Memory leaks
when usingnew
.- Function
implementations in header
files (except for function templates).
- Use
standard library
extensively. Additional files
allowed if necessary.
Follow the Orthodox Canonical Form
for classes Modules 02-09
, which must implement four essential member functions:
- Default constructor
- Copy constructor
- Copy assignment operator
- Destructor
- Split class code into two files: Header file
.hpp/.h
for class definition, and Source file.cpp
for implementation
Module 00: String class, Abstraction, Encapsulation
Module 01: Memory Allocation, References vs Pointers, Switch cases and Callbacks Functions
Module 02: Orthodox Canonical Form, Fixed-point Number Class implementation, Overload Operators
Module 03: Abstract Classes, Single Inheritance, Multiple Inheritance, Diamond Inheritance
Module 04: Polymorphism and Interfaces
Each exercise's compilation is done separately by running the Makefile within the exercise's folder.
#in the ex00, ex01, ex02 or ex03 directory
$>make
β OK | β Good | ββ VeryGood | π€© Amazing | π Bookmarked2Read
π Blog | π Chat | πΉ Video | π Book