Variables are like containers or holders of values. If you want to save an integer somewhere you have to assign it to a variable as such:
int someInteger = 4;
Now, here are some rules for defining a variable in C++:
1) The declaration of a variable consists of three parts (the type of the variable, the name of the variable, and the value you are assigning to the variable)
2) The name of the variable can't be a reserved word such as (string, int, double, this, class, main, return, etc.)
3) The value you assign to the variable has to be of the same type as the variable itself. Here are examples:
int a = 7; // this is good
double k = 2.4; // this is good
int c = 5.6; // this is bad because you are assigning a
// double to a variable of type int (integer)