Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ง C++ Final Operator Overloading

This C++ program demonstrates advanced operator overloading using custom classes Whole and Decimal. The program supports various operations such as arithmetic, comparison, and logical operators. It also showcases user input and output functionalities, utilizing custom printing functions and the ability to handle boolean logic.

โœจ Features

  • โž• Addition (+): Overloaded to perform addition on Whole and Decimal types.
  • โž– Subtraction (-): Overloaded to perform subtraction on Whole and Decimal types.
  • โœ–๏ธ Multiplication (*): Overloaded to perform multiplication on Whole and Decimal types.
  • โž— Division (/): Overloaded to perform division on Whole and Decimal types.
  • ๐Ÿงฎ Equality (==): Compares two Whole or Decimal objects for equality.
  • ๐Ÿ”ฒ Logical AND (&&): Performs logical AND operation between Whole or Decimal types.
  • ๐Ÿ”ณ Logical OR (||): Performs logical OR operation between Whole or Decimal types.
  • ๐Ÿ–ฅ๏ธ User Input and Output: Handles user input for Decimal values and prints the results of operations.
  • ๐Ÿ’ก Custom Printing Function: Utilizes yoi::print and yoi::printer for formatted output.

๐Ÿš€ How to Run

  1. Clone the repository:

    git clone <repository_url>
  2. Navigate into the project directory:

    cd cpp-operator-overloading-final
  3. Compile the C++ program:

    g++ finalc.cpp -o finalc
  4. Run the program:

    ./finalc

๐Ÿ“‚ File Structure

  • ๐Ÿ“œ finalc.cpp - The C++ source file containing the logic for operator overloading, arithmetic, logical, and comparison operations.
  • ๐Ÿ“– README.md - This file, containing details about the project.

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ”ง Explore operator overloading and custom input/output handling in C++! ๐Ÿ’ป

About

This **C++ program** demonstrates advanced **operator overloading** using custom classes `Whole` and `Decimal`. The program supports various operations such as arithmetic, comparison, and logical operators. It also showcases user input and output functionalities, utilizing custom printing functions and the ability to handle boolean logic.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages