There are different kinds of operators that can be overloaded.
An operator that takes a single operand is called a unary operator:
++ is a unary operator because it works on a single variable.
Unary operators are defined by member functions named
does not take any parameters because it uses only the object that the operator is being executed on.
The following are the overloadable unary operators and their corresponding operator strings: