|
|
|
|
Operator precedence
|
:: |
Left-right |
i++,i-- |
() |
[] |
. |
-> |
++i, --i |
Right-left |
+i, -i |
! ~ |
(type) |
*
|
& |
new, new[] |
delete, delete[] |
.*, ->* |
Left-right |
*,
/,
% |
+,
- |
<<,
>> |
<,
<= |
>, >= |
==,
!= |
&
(bitwise) |
^
(bitwise) |
|
(bitwise)
|
&& |
|| |
c ? t :
f |
Right-Left
|
= |
+=, -= |
*=, /=, %= |
<<=, >>= |
&=, ^=, |= |
,(Comma) |
Left-right
|
|
|
Loops
|
for(Init;Condition;Increment)
Statement;
|
do
Statement
while(Condition);
|
while(Condition)
Statement;
|
break exits loop
continue
ends current iteration
|
|
|
|
const and pointers
|
const
int*
|
pointer to const int
|
int*
const
|
const pointer to int
|
const
int* const
|
const pointer to const int
|
|
|
Typedefs
|
typedef
ExistingType Alias;
|
|
|
Enums
|
enum TEnumType
{Value1=const,
...};
enum class TEnumType {...};
enum class TEnumType : BaseType {...};
|
|
|
CMP EAX,EDX
Ja Dest //Jumps if EAX>EDX
Unsigned
|
C
Z
|
Above
|
0 & 0
|
Below
|
1
| X
|
Above
or Equal
|
0 & X
|
Below or Equal
|
1
| 1
|
Signed
|
|
Greater
|
Z
& ( S &O |
S
&
O
) |
Less
|
S &
O
|
S
& O |
Greater or Equal
|
S & O |
S
&
O
|
Less
or Equal
|
Z |
(S &
O
|
S
& O) |
|
|
Templates
|
template<typename
F>friend class TFriendClass;
|
template<typename
T, bool>
class
Selector
{public: typedef
TClassType01<T> ClassType;};
template<typename T>
class
Selector<T, true> {public: typedef
TClassType02<T> ClassType;};
|
|
|
Function Pointers
|
typedef int
(*FuncType)(int Param);
|
typedef int
(TClass::*MemberFuncType)(int Param);
|
|
|
|
|