Hi,
I need to finish a assignment on operator overloading but this one piece of code doesnt seem to make sense..
in my int main() i have
int main()
{
Element a, b(5), c(7), d;
cout << (5+b) << endl;
this is just part of it, I have already implemented the overloading functions
but from my understanding the overloading operators of class works eg:
a + b would be a.operator+(b) but then how can 5+b be 5.operator+(b) since 5 is a int.
Please can same one help?
Thanks