How do you handle an "array bounds exceeded" error from an infile.get statement?
Printable View
How do you handle an "array bounds exceeded" error from an infile.get statement?
something like this.
Code:const int MAX_ARRAY=10;
...
int array[MAX_ARRAY];
int x =0;
while((inFile)&&(X<MAX_ARRAY))
{
inFile >> array[x];
x++;
}