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 ,

posted on 2013-09-14 07:55  程序猴chengxuhou.com  阅读(180)  评论(0编辑  收藏  举报

导航