Hi,
Can someone please explain to me exactly what happens when line
Rational result = left;
is executed?
Note: in the user-defined class Rational, the assignment operator has not been redefined and no copy constructor has been defined either.Code:Rational operator+ (const Rational & left, const Rational & right)
{
Rational result = left;
result += right;
return result;
}
Thanks,
- Canadian