| cppreference.com -> C++ Operator Precedence |
The operators at the top of this list are evaluated first.
| Precedence | Operators | |||
|---|---|---|---|---|
| 1 | () | [] | -> | . |
| :: | ||||
| ! | ~ | ++ | -- | |
| 2 | - (unary) | * (dereference) | ||
| & (address of) | sizeof | |||
| 3 | ->* | .* | ||
| 4 | * (multiply) | / | % | |
| 5 | + | - | ||
| 6 | << | >> | ||
| 7 | < | <= | > | >= |
| 8 | == | != | ||
| 9 | & (bitwise AND) | |||
| 10 | ^ | |||
| 11 | | | |||
| 12 | && | |||
| 13 | || | |||
| 14 | ? : | |||
| 15 | = | += | -= | etc. |
| 16 | , | |||