|
int8_t
|
-128 to 127
|
|
uint8_t
|
0 to 255
|
|
int16_t
|
-32768 to 32767
|
|
uint16_t
|
0 to 65535
|
|
int32_t
|
-2147483648 to 2147483647
|
|
uint32_t
|
0 to 4294967295
|
|
int64_t
|
-9.2 * 1018 to 9.2 * 1018
|
|
uint64_t
|
0 to 1.8 * 1019
|
|
255
|
Integer
|
|
0xaf
|
Hexadecimal Integer
|
|
1234.0
|
double
|
|
234.243f
|
float
|
|
true
|
bool
|
|
"Hello World"
|
string/c-string
|
|
'a'
|
char
|
|
#include <LIB>
|
Includes standard header file LIB
|
|
#include "Header.h"
|
Includes Header.h file
|
|
#define PI 3.14159265359
|
Defines Easy Macro
|
|
#define f(a,b) a+b
|
More Complex Macro
|
|
#undef PI
|
Remove Definition
|
|
#ifdef PI
|
Checks for definition, if true, code will be compiled
|
|
#else
|
Else part of the above if-statement
|
|
#endif
|
Ends the if-statement
|
|
&
|
Bitwise AND
|
|
|
|
Bitwise OR
|
|
^
|
Bitwise XOR
|
|
~
|
Bitwise NOT
|
|
<<
|
Shift left
|
|
>>
|
Shift right
|
|
==
|
Test of equality
|
|
!=
|
Test of non-equality
|
|
<
|
Less than
|
|
>
|
Greater than
|
|
<=
|
Less than or equal
|
|
>=
|
Greater than or equal
|
|
!
|
NOT
|
|
&&
|
AND
|
|
||
|
OR
|
|
+
|
addition
|
|
-
|
subtraction
|
|
*
|
multiplication
|
|
/
|
division
|
|
%
|
modulo
|
|
++var
|
increase before evaluation
|
|
var++
|
increase after evaluation
|
|
condition ? result : alternative;
|
short form of if-like structure
|
|
::
|
Scope Operator
|
|
->
|
pointer-to-member
|
|
.
|
Access member
|
|
<< >>
|
Bitshift(with streams: input/output)
|
|
&
|
Gets RAM adress of Variable(to save into pointer)
|
|
*
|
Dereferences pointer(returns it´s content) or defines a variable to be a pointer
|
|
->
|
Access pointer class member. same as (*pointer).member()
|
|
new
|
Create new object on heap, returns pointer to object
|
|
delete
|
Remove object at the pointer on heap
|
Very basic and straightforward. Would have preferred to have the comments placed to the right instead of above and readjust other parts to the second page to accommodate proper spacing. Thanks.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.