C++运算符优先级 | |||
优先级 | 运算符 | 描述 | 方向 |
1 | :: | Scope resolution-范围解析 | Left-to-right |
2 | ++ -- | Suffix/postfix increment and decrement-前缀/后缀递增和递减 | |
() | Function call-函数调用 | ||
[] | Array subscripting-数组下标 | ||
. | Element selection by reference-引用元素选择器 | ||
−> | Element selection through pointer-指针元素选择器 | ||
3 | ++ -- | Prefix increment and decrement--前缀递增和递减 |