M
Michael T. Peterson
I am unable to figure out how to overload the '==' operator. The code
below( cc'd it from an example on the net) doesn't compile:
bool operator== ( const GivenName &lhs, const GivenName &rhs ) {
return( lhs.first == rhs.first && lhs.middle == rhs.middle &&
lhs.last == rhs.last );
}
The error message is 'operator ==' has too many parameters.
Any suggestions, explanations, references to docs or books, etc., would be
greatly appreciated.
Cheers,
Michael
below( cc'd it from an example on the net) doesn't compile:
bool operator== ( const GivenName &lhs, const GivenName &rhs ) {
return( lhs.first == rhs.first && lhs.middle == rhs.middle &&
lhs.last == rhs.last );
}
The error message is 'operator ==' has too many parameters.
Any suggestions, explanations, references to docs or books, etc., would be
greatly appreciated.
Cheers,
Michael