| Operators | Description | Associativity |
:: |
Scope resolution | N/A |
++ --
|
Postfix increment and decrement Function call |
left-to-right |
++ --
|
Prefix increment and decrement Unary plus and minus |
right-to-left |
.* ->* |
Pointer to member | left-to-right |
* / % |
Multiplication, division, and modulus (remainder) | |
+ - |
Addition and subtraction | |
<< >> |
Bitwise left shift and right shift | |
< <=
|
Relational “less than” and “less than or equal to” Relational “greater than” and “greater than or equal to” |
|
== != |
Relational “equal to” and “not equal to” | |
& |
Bitwise AND | |
^ |
Bitwise XOR (exclusive or) | |
| |
Bitwise OR (inclusive or) | |
&& |
Logical AND | |
|| |
Logical OR | |
c?t:f |
Ternary conditional | right-to-left |
=
|
Direct assignment Assignment by sum and difference |
|
, |
Comma | left-to-right |