C++中运算符优先级_C/C++_编程开发_程序员俱乐部
C++中运算符优先级
- 摘要:Indecreasingorder:var++andvar--(postfix),static_cast<type>()(cast)+,-(Unaryplusandminus),++varand--var(prefix)!(Not)*,/,%(Multipication,divisionandmodulus)+,-(Binaryaddtionandsubstraction)<,<=,>,>=(Comparison)==,!=(Equality)&
- 标签:c++
?
In decreasing order :?
-
var++ and var--?( postfix ), static_cast<type>()?( cast )
-
+,- (Unary plus and minus ), ++var and --var?( prefix )
-
! ( Not )
-
*, /, % ( Multipication, division and modulus )
-
+, -? ( Binary addtion and substraction )
-
<, <=, > , >= ( Comparison )
-
==, != ( Equality )
-
&& ( AND )
-
|| ( OR )
-
=, +=, -=, *=, /=, %= ( Assignment operator )