Beginning C++ Game Development with Arrays
BRUCE R. SUTHERLAND · Apress eBooks · 2014
We will begin to create our first C++ game in this chapter. So far this book has looked at the various types supplied by the C++ programming language as well as the operators that can be used to alter and compare these types. The next major area of the C++ programming language that you should understand to begin constructing complex programs is data storage. The individual types in C++, such as int and char , can hold single values, but often we will want to be able to remember multiple values all relating to similar things. We could achieve this by creating a unique variable for every object with a value that we wish to remember; however, C++ provides us with arrays to store multiple values together. This chapter takes a look at how arrays are used in C++ and also explores how we can use arrays to begin our text adventure game. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.