First page Back Continue Last page Graphics
operatorop (cont.)
General form: operatorop(argument-list)
operator+( ) // overload the + operator
operator*( ) // overload the * operator
operator=( ) // overload the assignment
operator==( ) // overload the equality
operator[ ] ( ) // overload the [ ] operator
Go over the following two examples:
- prata: mytime0 // sum member function
- prate: mytime1 // overloaded + operator
These examples use a different Time class than my ADT demo.