Operators Summary
Go Up to Language Structure Index
Operators are tokens that trigger some computation when applied to variables and other objects in an expression.
All operators can be overloaded except the following:
. |
C++ direct component selector |
.* |
C++ dereference |
:: |
C++ scope access/resolution |
?: |
Conditional |
Depending on context, the same operator can have more than one meaning. For example, the ampersand (&) can be interpreted as:
- a bitwise AND (
A & B
) - an address operator (
&A
) - in C++, a reference modifier
Note: No spaces are allowed in compound operators. Spaces change the meaning of the operator and will generate an error.