C++ 语言操作符的优先级
cppreference.com -> C++ 操作符优先级 |
C++ 操作符优先级
优先级 | 操作符 | |||
---|---|---|---|---|
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 | , |
转载请注明文章来自:程序猴(http://www.chengxuhou.com/)
posted on 2013-09-14 07:55 程序猴chengxuhou.com 阅读(181) 评论(0) 编辑 收藏 举报