Lost Memory

Programming is an art, then be an artist.

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  6 Posts :: 1 Stories :: 0 Comments :: 0 Trackbacks

常用链接

留言簿

我参与的团队

搜索

  •  

积分与排名

  • 积分 - 12345
  • 排名 - 1051

最新评论

阅读排行榜

评论排行榜

Precedence Operator Description Associativity
1

highest

:: Scope resolution (C++ only) None
2 ++ Suffix increment Left-to-right
-- Suffix decrement
() Function call
[] Array subscripting
. Element selection by reference
-> Element selection through pointer
typeid() Run-time type information (C++ only) (see typeid)
const_cast Type cast (C++ only) (see const_cast)
dynamic_cast Type cast (C++ only) (see dynamic_cast)
reinterpret_cast Type cast (C++ only) (see reinterpret_cast)
static_cast Type cast (C++ only) (see static_cast)
3 ++ Prefix increment Right-to-left
-- Prefix decrement
+ Unary plus
- Unary minus
! Logical NOT
~ Bitwise NOT (One's Complement)
(type) Type cast
* Indirection (dereference)
& Address-of
sizeof Size-of
new, new[] Dynamic memory allocation (C++ only)
delete, delete[] Dynamic memory deallocation (C++ only)
4 .* Pointer to member (C++ only) Left-to-right
->* Pointer to member (C++ only)
5 * Multiplication Left-to-right
/ Division
% Modulo (remainder)
6 + Addition Left-to-right
- Subtraction
7 << Bitwise left shift Left-to-right
>> Bitwise right shift
8 < Less than Left-to-right
<= Less than or equal to
> Greater than
>= Greater than or equal to
9 == Equal to Left-to-right
!= Not equal to
10 & Bitwise AND Left-to-right
11 ^ Bitwise XOR (exclusive or) Left-to-right
12 | Bitwise OR (inclusive or) Left-to-right
13 && Logical AND Left-to-right
14 || Logical OR Left-to-right
15 ?: Ternary conditional (see ?:) Right-to-left
16 = Direct assignment Right-to-left
+= Assignment by sum
-= Assignment by difference
*= Assignment by product
/= Assignment by quotient
%= Assignment by remainder
<<= Assignment by bitwise left shift
>>= Assignment by bitwise right shift
&= Assignment by bitwise AND
^= Assignment by bitwise XOR
|= Assignment by bitwise OR
17 throw Throw operator (exceptions throwing, C++ only) Right-to-left
18

lowest

, Comma Left-to-right

reference url: http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B
posted on 2013-05-02 13:06 pamilty 阅读(522) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理