Variables and Input

Variables are like storage boxes- they hold all the necessary information your game needs to run. Variables might hold information like the position of your player, how much ammo they have, how many lives they have, and whether Mario is big or small.

In C++, you need to tell your program what type a variable is before you use it. There are four main types of variables we use in our class the most frequently: int, bool, char, and float/double. Here's what each type is used for: