woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

可重载运算符和不可重载运算符

可重载运算符表:

Operator

Name

Type

Operator

Name

Type

,

Comma

Binary

–>*

Pointer-to-member selection

Binary

!

Logical NOT

Unary

/

Division

Binary

!=

Inequality

Binary

/=

Division/assignment

Binary

%

Modulus

Binary

< 

Less than

Binary

%=

Modulus/assignment

Binary

<< 

Left shift

Binary

&

Bitwise AND

Binary

<<=

Left shift/assignment

Binary

&

Address-of

Unary

<=

Less than or equal to

Binary

&&

Logical AND

Binary

=

Assignment

Binary

&=

Bitwise AND/assign

Binary

==

Equality

Binary

( )

Function call

> 

Greater than

Binary

*

Multiplication

Binary

>=

Greater than or equal to

Binary

*

Pointer dereference

Unary

>> 

Right shift

Binary

*=

Multiplication/assign

Binary

>>=

Right shift/assignment

Binary

+

Addition

Binary

[ ]

Array subscript

+

Unary Plus

Unary

^

Exclusive OR

Binary

++

Increment1

Unary

^=

Exclusive OR/assignment

Binary

+=

Addition/assignment

Binary

|

Bitwise inclusive OR

Binary

Subtraction

Binary

|=

Bitwise inclusive OR/assignment

Binary

Unary negation

Unary

||

Logical OR

Binary

––

Decrement1

Unary

~

One’s complement

Unary

–=

Subtraction/assign

Binary

delete

delete

–>

Member selection

Binary

new

 

 

 

不可重载运算符表:

 

Operator

Name

.

Member selection

.*

Pointer-to-member selection

::

Scope resolution

? :

Conditional

#

Preprocessor symbol

##

Preprocessor symbol

 

posted on 2008-09-21 22:04 肥仔 阅读(1935) 评论(0)  编辑 收藏 引用 所属分类: C++ 基础


只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理