运算符优先级
来源:互联网 发布:网站建设推广优化 编辑:程序博客网 时间:2024/06/05 05:58
! ↑ (高)
算数 |
关系 |
&&和|| |
赋值 | (低)
相关资料:C++ Operator Precedence
::
Scope resolutionLeft-to-right++
--
Suffix/postfix increment and decrementtype()
type{}
Function-style type cast()
Function call[]
Array subscripting.
Element selection by reference->
Element selection through pointer++
--
Prefix increment and decrementRight-to-left+
-
Unary plus and minus!
~
Logical NOT and bitwise NOT(type)
C-style type cast*
Indirection (dereference)&
Address-ofsizeof
Size-of[note 1]new
, new[]
Dynamic memory allocationdelete
, delete[]
Dynamic memory deallocation.*
->*
Pointer to memberLeft-to-right*
/
%
Multiplication, division, and remainder+
-
Addition and subtraction<<
>>
Bitwise left shift and right shift<
<=
For relational operators < and ≤ respectively>
>=
For relational operators > and ≥ respectively==
!=
For relational = and ≠ respectively&
Bitwise AND^
Bitwise XOR (exclusive or)|
Bitwise OR (inclusive or)&&
Logical AND||
Logical OR?:
Ternary conditional[note 2]Right-to-left=
Direct assignment (provided by default for C++ classes)+=
-=
Assignment by sum and difference*=
/=
%=
Assignment by product, quotient, and remainder<<=
>>=
Assignment by bitwise left shift and right shift&=
^=
|=
Assignment by bitwise AND, XOR, and ORthrow
Throw operator (for exceptions),
CommaLeft-to-right 0 0
- 运算符优先级-C++运算符优先级
- 运算符优先级-Java 运算符优先级
- 运算符优先级-Python 运算符优先级
- 运算符优先级-PHP运算符优先级
- 运算符优先级
- c 运算符 优先级
- JScript 运算符优先级
- C++运算符优先级
- c 运算符 优先级
- c++运算符优先级
- c++运算符优先级
- C++运算符优先级
- C++ 运算符优先级
- 运算符优先级
- 运算符优先级
- 运算符 优先级
- 运算符的优先级
- 运算符优先级问题
- 10年左右的 文章 关于android 源码编译。。。
- hdu2033 人见人爱A+B
- idea快捷键
- HDUJ 1212 Big Number
- Tasklist命令详解
- 运算符优先级
- KGTP、linux内核、GDB的系统结构
- log4net使用记录
- GCC的链接问题
- mysql 插入中文数据乱码解决方案
- python django+uwsgi+nginx 搭建步骤(血一般的教训)
- HDU 1242 Rescue
- 简体中文——繁体转换
- jboss内存设置详解