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 )

你可能感兴趣的:(C++)