Base Data Types
int 1Whole numbers -2147483648 to 2147483647
float 0.1Floating numbers 3.4e^-38 to 3.4e^38
double 0.2dFloating numbers from 1.7e^-308 to 1.7e^308
char `a`Single character
bool true / false
void voidValueless data type
Container Types
array type array[size] = {1, 2, 3};
vector vector<type> vectorname;
deque deque<type> dequename
list std::list<int> listname = { 12, 5, 10, 9 };
forward_list forward_list<int> listname;
set std::set<int> setname;
multiset multiset <int> setname;
map map<int, char> mapname;
multimap std::multimap<int, char> mapname;
stack stack<int> stackname;
queue queue<int> queuename;
priority_queue priority_queue<int> queuename;
Flow Control
if / else / else if
if (boolean expression) {
    // statements
} else if (boolean expression) {
    // statements
} else {
    // statements
}
while
while (boolean expression) {
    // statements
}
do while
do {
    // statements
} while (boolean expression);
for loop
for (int i = 0; i < size; i++) {
    // statements
}
for each
for (type var : array / vector) {
    // statements
}
switch / case / default
switch(var) {
    case varValue1:
        // statements
        break;
    case varValue2:
        // statements
        break;
    default:
        // statements
}
try / catch
try {
    // statements
} catch (ExceptionName e) {
    // statements
}
function
void functionName(type arg1) {
    // statements
}
type functionName() {
    // statements
return value;}
Hello World
#include<iostream>
int main() {
    std::cout << "Hello world!";
}
Boolean Logic
Comparisons <, <=,>, >=, ==, !=
And &&
Or ||
Negate !(boolean expression)
Bitwise Operators
And &
Or |
Exclusive Or (XOR) ^
Not ~
Left Shift <<
Right Shift >>
Arithmetic Operators
Add +
Subtract -
Multiply *
Divide /
Modulus %
Increment i++ post
++i pre
i += 1; assignment
Decrement i-- post
--i pre
i -= 1; assignment