[C++] 연산자 우선순위

CS/C/C++ 2009. 1. 18. 22:27

::

Scope resolution

None

.

Member selection (object)

->

Member selection (pointer)

[]

Array subscript

()

Function call

()

Member initialization

++

Postfix increment

--

Postfix decrement

typeid()

Type name

cast

Type cast (conversion)

sizeof

Size of object or type

++

prefix increment

--

postfix decrement

~

One's complement

!

Logical not

-

Unary minus

+

Unary plus

&

Address of

*

Indirection

new

Create object

delete

Destroy object

()

Cast

.*

Pointer to member (objects)

->*

Pointer to member (pointer)

*

Multiplication

/

Division

%

Modulus

+

Addition

-

Subtraction

<<

Left shift

>>

Right shift

<

Less than

>

Greater than

<=

Less than or equal to

>=

Greater than or equal to

==

Equality

!=

Inequality

&

Bitwise AND

^

Bitwise exclusive OR

|

Bitwise inclusive OR

&&

Logical AND

||

Logical OR

E1 ? E2 : E3

Conditional

=

Assignment

*=

Multiple assignment

/=

Division assignment

%=

Modulus assignment

+=

Addition assignment

-=

Subtraction assignment

<<=

Left-shift assignment

>>=

Right-shift assignment

&=

Bitwise AND assignment

|=

Bitwise inclusive OR assignment

^=

Bitwise exclusive OR assignment

throw expr

Throw expression

,

comma




: