The third C++ module of the 42 curriculum, focused on operator overloading and fixed-point numbers.
This project implements a fixed-point number class using a bit-shift representation instead of native floats, along with the operator overloads (arithmetic, comparison, increment/decrement, stream insertion) required to make it behave like a built-in numeric type.
Each exercise (ex00 to ex02) contains its own Makefile. Compile and run individually:
cd ex00
make
./ex00- ex00: Basic Fixed-point class with a fixed-point representation and getter/setter methods.
- ex01: Conversion to/from int and float, plus a static point-generation function.
- ex02: Full operator overloading (comparison, arithmetic, increment/decrement, min/max) for the Fixed-point class.
Each exercise is self-contained in its own directory with its own source files, header, and Makefile, following the standard 42 module layout.