Hello friends...I'm having confusion about binary operator overloading in the following program.
The question goes like this.
Qn. Create a class time with two member variables as hours and minutes of integer type,write default,parameterized and copy constructor. Overload necessary operators to compute T3=5+T1+T2, where T1,T2 and T3 are time objects. And the constant 5 is to be added to 'hours' member only.
For this i've created two friend function to overload the operators and the code is as given below. But its not working, It would be very much helpful if u could provide me with the logic behind this problem and what has gone wrong in the following piece of code:
friend time operator +(time x,time y);
friend time operator ++(time r,int p);
time operator+(time x,time y)
time operator ++(time r,int p)
Thanks in advance.