Game Development Reference
In-Depth Information
One-dimensional arrays
A one-dimensional array is an array that holds data in one column.
To initialize a one-dimensional array, type its name, then an open square bracket, the index
number, a closing square bracket, and then its value.
The following is a sample of a one-dimensional array being initialized:
If you want to create an array with multiple entries for a later time, simply put the index
number as the number of entries you want to create. All entries will be created and set to
zero by default.
To access the values, you must type the array name, as well as the index number enclosed
by square brackets.
Search WWH ::




Custom Search