Skip to content

ricvrdv/cpp-02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ Module 02

Concepts:

  • Function overloading (Ad-hoc polymorphism)
  • Operator overloading
  • Orthodox Canonical form
  • Fixed-point numbers

ex00

Implemented a Fixed class in Orthodox Canonical Form with raw bit storage and accessor methods, practicing constructors, destructors, copy semantics, and encapsulation.

Usage:

make
./fixed

ex01

Extended the Fixed class with int and float constructors, conversion methods (toInt, toFloat), and stream output overloading to represent fixed-point numbers more meaningfully.`

Usage:

make
./fixed

ex02

Enhanced the Fixed class with overloaded comparison, arithmetic, and increment/decrement operators, plus static min/max functions, enabling natural mathematical operations between fixed-point objects.

Usage:

make
./fixed

✅ Check out C++ Module 03 - inheritance between classes

⏪️ Go back to C++ Module 01 - new, delete, references, file manipulation

About

C++ Module 02 - function and operator overloading

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published