( += , *= ), but you will overload them while ignoring their return value,

thus using "void" as the return type.

Finally, at the last level, you will overload the operators

while respecting the prototypes used in the C++ norm.

For example, auto-assignment operators

shall return a reference to an instance of the class.

This is it for the three levels of overloading

(four if we include the fact not to overload anything)

which we let you choose for your own programs.

Let us examine a few short examples at the last level

of the previous slide.

In the previous episodes, we have already seen

the auto-assignment operator " += " which lets us write

expressions such as "p += q".

On the outer overloading, we have also seen the addition

which lets us write expressions such as "r = p + q".

This here is the addition operator.

Similarly, we could define the auto-subtraction

operator which would let us write "p -= q".

Considering the subtraction, we also have the "minus sign".

Here, it is not a subtraction but the additive inverse.

For example, if we write "r = -p" it is also an operator " - "

which will be internally overloaded and which does not take arguments.

There is no second argument to this operator.

This is called an "unary operator".

We have also seen the printing operator

which lets us prints the instances of our classes

the same way we would print a double or an int.

We have also seen, regarding the outer multiplication,

the left multiplication, by an element of another class.

For example, here, " p " and " q " are elements of class,

such as complex numbers.

However, here, " x " is an element of another class

or a basic-type variable.

For example, we used a double here.

We could have, internally, a multiplication

by one of these other types.

For a complex number " p ",

we could write "p *= x " where x is a double.