Question: Consider a class Number having a member (of type float) and following instances. float someFloat = 2.0; Number a(1.0), b(1.0); Discuss how the following expression

Consider a class Number having a member (of type float) and following instances.

float someFloat = 2.0; Number a(1.0), b(1.0);

Discuss how the following expression is possible using operator overloading. If it is impossible, give an example of what error would be produced (in maximum 5 lines)?

someFloat = someFloat + a + b;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!