Chapter 2. Variables and Memory
To write your C++ game program, you will need your computer to remember a lot of things. Things such as where in the world is the player, how many hit points he has, how much ammunition he has left, where the items are in the world, what power-ups they provide, and the letters that make up the player's screen name.
The computer that you have actually has a sort of electronic sketchpad inside it called memory, or RAM. Physically, computer memory is made out of silicon and it looks something similar to what is shown in the following screenshot:
RAM is short for Random Access Memory. It is called random access because you can access any part of it at any time. If you still have some CDs lying around, they are an example of non-random access. CDs are meant to be read and played back in order. I still remember jumping tracks on Michael Jackson's...