C++ allows the overloading of operators and functions. A single operator or function can be used with different classes of objects, which can simplify a program's code. Overloading allows a user to control the behaviour of an operator with both user-defined and standard classes. You could, for example, create an operator that differentiated between scalar, vector, and matrix operations or one that could handle complex math. While these examples are not particularly important to the typical user, they are very important for mathematical and engineering tasks.
The following is copied from Borland C++ v5.02 help:
"C++ lets you redefine the actions of most operators, so that they perform specified functions when used with objects of a particular class. As with overloaded C++ functions in general, the compiler distinguishes the different functions by noting the context of the call: the number and types of the arguments or operands.
All the operators can be overloaded except for:
. .* :: ?:
The following preprocessing symbols cannot be overloaded.
The =, [ ], ( ), and -> operators can be overloaded only as nonstatic member functions. These operators cannot be overloaded for enum types. Any attempt to overload a global version of these operators results in a compile-time error.
The keyword operator followed by the operator symbol is called the operator function name; it is used like a normal function name when defining the new (overloaded) action for the operator.
A function operator called with arguments behaves like an operator working on its operands in an expression. The operator function cannot alter the number of arguments or the precedence and associativity rules applying to normal operator use."