Professional Documents
Culture Documents
Operator Summary
Symbol Name
Assoc.Example
::
Scope resolution
L/R
class_name::member
::
Global
L/R
::name
Member selection
L/R
object.member
->
Member selection
L/R
pointer->member
[]
Subscripting
L/R
pointer [ expr ]
()
Function call
L/R
expr ( expr_list )
()
Value contruction
L/R
type ( expr_list )
++
Post increment
R/L
lvalue++
--
Post decrement
R/L
lvalue--
sizeof
sizeof
++
-~
!
+
&
size of object
size of type
pre increment
pre decrement
complement
not
unary minus
unary plus
address of
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
sizeof expr
sizeof ( type )
++lvalue
--lvalue
~ expr
! expr
- expr
+ expr
& lvalue
dereference
R/L
* expr
new
delete
delete []
()
create
destroy
destroy array
type cast
R/L
R/L
R/L
R/L
new type
delete pointer
delete [] pointer
( type ) expr
Operator Summary
.*
->*
member selection
member selection
*
/
multiply
divide
modulo
+
-
add
subtract
<<
>>
shift left
shift right
<
<=
>
>=
less than
less than or equal
greater than
greater than or equal
L/R
L/R
L/R
L/R
==
!=
equal
not equal
&
bitwise AND
bitwise exclusive OR
bitwise inclusive OR
&&
logical AND
||
logical inclusive OR
?:
conditional expression
=
*=
/=
%=
+=
-=
<<=
>>=
&=
^=
|=
simple assignment
multiply and assign
divide and assign
modulo and assign
add and assign
subtract and assign
shift left and assign
shift right and assign
AND and assign
exclusive OR and assign
inclusive OR and assign
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
R/L
throw
throw exception
comma
lvalue = expr
lvalue *= expr
lvalue /= expr
lvalue %= expr
lvalue += expr
lvalue -= expr
lvalue <<= expr
lvalue >>= expr
lvalue &= expr
lvalue ^= expr
lvalue |= expr