Precedence 1 highest
Operator :: ++ -() [] . -> typeid() const_cast dynamic_cast reinterpret_cast static_cast ++ -+ ! ~ (type) * & sizeof new, new[] delete, delete[] .* ->* * / % + << >> < <= > >= == != & ^ | && || ?: = += -= *= /= %= <<= >>= &= ^= |= throw ,
Description Scope resolution (C++ only) Suffix increment Suffix decrement Function call Array subscripting Element selection by reference Element selection through pointer Run-time type information (C++ only) (see typeid) Type cast (C++ only) (see const cast) Type cast (C++ only) (see dynamic_cast) Type cast (C++ only) (see reinterpret cast) Type cast (C++ only) (see static cast) Prefix increment Prefix decrement Unary plus Unary minus Logical NOT Bitwise NOT Type cast Indirection (dereference) Address-of Size-of Dynamic memory allocation (C++ only) Dynamic memory deallocation (C++ only) Pointer to member (C++ only) Pointer to member (C++ only) Multiplication Division Modulo (remainder) Addition Subtraction Bitwise left shift Bitwise right shift Less than Less than or equal to Greater than Greater than or equal to Equal to Not equal to Bitwise AND Bitwise XOR (exclusive or) Bitwise OR (inclusive or) Logical AND Logical OR Ternary conditional (see ?:) Direct assignment Assignment by sum Assignment by difference Assignment by product Assignment by quotient Assignment by remainder Assignment by bitwise left shift Assignment by bitwise right shift Assignment by bitwise AND Assignment by bitwise XOR Assignment by bitwise OR Throw operator (exceptions throwing, C++ only) Comma
Associativity Left-to-right
Right-to-left
4 5 6 7
Left-to-right
9 10 11 12 13 14 15
Right-to-left
16
17 18
Left-to-righ