C++中运算符优先级_C/C++_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > C/C++ > C++中运算符优先级

C++中运算符优先级

 2012/6/11 0:14:21  Jia_er  程序员俱乐部  我要评论(0)
  • 摘要:Indecreasingorder:var++andvar--(postfix),static_cast<type>()(cast)+,-(Unaryplusandminus),++varand--var(prefix)!(Not)*,/,%(Multipication,divisionandmodulus)+,-(Binaryaddtionandsubstraction)<,<=,>,>=(Comparison)==,!=(Equality)&
  • 标签:c++

?

In decreasing order :?
  1. var++ and var--?( postfix ), static_cast<type>()?( cast )
  2. +,- (Unary plus and minus ), ++var and --var?( prefix )
  3. ! ( Not )
  4. *, /, % ( Multipication, division and modulus )
  5. +, -? ( Binary addtion and substraction )
  6. <, <=, > , >= ( Comparison )
  7. ==, != ( Equality )
  8. && ( AND )
  9. || ( OR )
  10. =, +=, -=, *=, /=, %= ( Assignment operator )
发表评论
用户名: 匿名