It depends on the language. In c++, operator overloading is done by declaring a function classname::operator==(const classname * isItEqualToThis)
(I may be wrong about the exact syntax--it's been several years since I used c++)
Operator overloading is a neat feature to have, but it can cause problems. It can make the programmer's life easier (can use ==, etc instead of writing out a function call), but it also encourages bad style. For instance:
MyStringClass *string1 = "blah";
string1 = string2;
This code sequence could do one of a number of things, depending on how the implementor wrote the class. It could put the string, "blah" into string2. Or, it could set string2 to point to string1! Or even worse, the implementor could have made "=" the operator for equality, and string1 = string2 could just be a comparison of the two strings!
While a useful ability, operator overloading isn't significantly easier than writing:
And this method makes the code easy to understand, and unambiguous.