Possible Duplicate:
Operator overloading
What is the differences between the following ways to overload operator== ?
// stroustrup way
friend bool operator== (MyClass &lhs, MyClass &rhs);
and
// as taught in other places, including caltech
bool MyClass::operator== (MyClass &rhs);
Which way is better?
No comments:
Post a Comment