- Overloading binary operators
- Non-static member function, one argument
- Non-member function, two arguments
- One argument must be class object or reference
- Upcoming example
- If non-static member function, needs one argument
- class String {
- public:
- const String &operator+=( const String & );
- ...
- };
- y += z equivalent to y.operator+=( z )
2004-11-01