c++_运算符先级和结合性.docVIP

  • 21
  • 0
  • 约1.57万字
  • 约 10页
  • 2016-10-12 发布于贵州
  • 举报
c_运算符先级和结合性

c/c++ 运算符的优先级和结合性ZZ 2010-05-18 15:29 Precedence Operator Description Example Associativity 1 () [] - . :: ++ -- Grouping operator Array access Member access from a pointer Member access from an object Scoping operator Post-increment Post-decrement (a + b) / 4; array[4] = 2; ptr-age = 34; obj.age = 34; Class::age = 2; for( i = 0; i 10; i++ ) ... for( i = 10; i 0; i-- ) ... left to right 2 ! ~ ++ -- - + * (type) sizeof Logical negation Bitwise complement Pre-increment Pre-decrement Unary minus Unary plus Dereference Address of Cast to a given type Return size in bytes if( !done ) ... flags

文档评论(0)

1亿VIP精品文档

相关文档