< Previous | Contents | Next >

Using Arrays

While string objects provide a great way to work with a sequence of characters, arrays provide a way to work with elements of any type. That means you can use an array to store a sequence of integers for, say, a high-score list. But it also means that you can use arrays to store elements of programmer-defined types, such as a sequence of items that an RPG character might carry.


 

Introducing the Hero’s Inventory ProgramCreating ArraysIndexing ArraysAccessing Member Functions of an Array ElementBeing Aware of Array Bounds