2007-07-13 07:28:46 UTC
What's the difference between
public int[ ] sourceType;
in a header file, and
int sourceType[ ];
in the body of a program?
**** **** **** **** **** **** ****
The program I have is giving me an index out of bounds error when iSource (below) becomes 21. The only place that sourceType is mentioned is in a header file, where it is declared as public int[ ] sourceType. A size is never specified for it (anywhere in the program). Does anyone know why the program is acting as if the array has a size limit of 21 (indexes 0-20) when no size is ever declared?
for (iSource = 1; iSource <= es. numSources; iSource++)
{
es.sourceType [iSource] = 32;
}