previous | start | next

Operators as Functions

We already know how to overload a function.

The trick to overloading an operator is that in C++, each operator has a corresponding function name.

To overload the operator, just overload its function!

But what is the name of the function that corresponds to the operator +?



previous | start | next