(Latest Revision: Wed May 8 12:59:45 PDT 2013 ) targetArrayFacts.txt

targetArrayFacts.txt





const int maxTargets = 15 ;

int target[maxTargets]  ;


The declaration above creates an array named target, with

Slots: |     |     |     |     |     |     |     |     |     |     |     |     |     |     |     |
indexes   0     1     2     3     4     5     6     7     8     9     10    11   12     13    14  

There 15 slots (maxTargets is equal to 15).  The indexes of the slots run from 0 to 14.  
(Understand this - there's no slot #15.  This is an example of a general rule of C++.
When you declare an array of N items, they are numbered 0 through N-1, and there is never an
item with index N.  If N is the number of items, the last item is numbered N-1.)