Question: Question 11 6 pts Classes: Operator Overloading Fill in the missing blanks so that the overloaded method will support the mathematical operation shown in main
Question 11 6 pts Classes: Operator Overloading Fill in the missing blanks so that the overloaded method will support the mathematical operation shown in main below: class Number public: int val; Number(int i){val = 1; } (Number rhs) { Number new Num + rhs.val): return (new Num ): }; int main() { Number one(1); Number two(2): Number three = one.operator+(two); // pass two to the method called operator+
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
