Variables
Variables are boxes to save some data
Data Types
We have to tell the computer what type of box it is (i.e. how big the box is and what we will put inside it
There are 3 groups of data types:
Primitive Types (char, int, float, double)
The Boolean Type (bool)
Standard Integer Types (uint8_t, int64_t, ...)
Variable Declaration
tell the computer the box's name and what we want to put inside
We must tell the computer that we are about to use a variable with some name before we use it. This action is called a declaration. And we can only declare a variable with the same name once per scope, (we'll talk about that later). We can declare one with this syntax: <type> <variable_name>;
. For example:
Last updated