First page Back Continue Last page Graphics
Overloading Restrictions (cont.)
ONLY member functions can overload:
- = // assignment operator
- ( ) // function call opeator
- [ ] // subscripting operator
- -> // class member access by pointer operator
You can't create new operator symbols.
You can't use an operator in a manner that violates the syntax rules for the originaloperator.
The overloaded operator must have at least one operand that is a user-defined type. (you can't overload for standard types).