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
Get step-by-step solutions from verified subject matter experts
