a portion of code which performs a specific task and is relatively independent of the remaining code. Also known as subroutine although this is less often used in C++
a variable assigns a particular instance of an object type a name or label by which the instance can be referred to. Typically a variable is bound to a particular address in computer memory that is automatically assigned to at runtime, with a fixed number of bytes determined by the size of the object type of a variable and any operations performed on the variable effects one or more values stored in that particular memory location.
Some simple variables include
int - this creates a variable that is an integer (32 bits)
long - this too creates an integer variable, but it supports 64 bits
short - this again creates an integer, but it only supports 16 bits
float - this creates a variable that supports decimals
double - this creates a variable that supports MORE decimals
bool - this creates a boolean variable, that can only be true or false (1 bit)
char - this allows one character to be entered (i.e. "W") (7 or 8 bit)