Summary


The subject of this chapter is probably less exciting than something like writing a cannon simulation. However, arrays are so massively useful in programs you absolutely can't write anything significant without them.

Arrays are blocks of memory locations that all hold the same type of information. They can have one, two, three, or more dimensions. The numbering for each dimension always starts with zero. Programs access arrays using the array name and a subscript number. Your program should never set the subscript number to a value that is outside the boundaries of an array.

Arrays are a powerful tool for handling groups of variables in your programs. The C++ programming language provides another tool that is similar to arrays but even more powerful and flexibleand more confusing. That tool is called a pointer, and pointers are the subject of the next chapter.



Creating Games in C++(c) A Step-by-Step Guide
Creating Games in C++: A Step-by-Step Guide
ISBN: 0735714347
EAN: 2147483647
Year: N/A
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net