0

Operator overloading Using Ratio Class

https://code.sololearn.com/ca142a50a21A The question is: Implement the binary subtraction operator, the unary negation operator, and the less-than operator < for the Ratio class (see Example 11.4 on page 259). In line 46 of this code I have to return an integer..Will I write return 0? Also for this code,how can I write the main() properly to test the code?

7th May 2021, 5:44 PM
Ramisa Fariha
Ramisa Fariha - avatar
4 Réponses
+ 1
@Martin Yes, I have noticed that too. The examples given in one chapter are not completed..it's like the rest of them are in the example of another chapter...They are all related
8th May 2021, 10:59 AM
Ramisa Fariha
Ramisa Fariha - avatar