How do you handle an "array bounds exceeded" error from an infile.get statement?
This is a discussion on checking array bounds within the C++ Programming forums, part of the General Programming Boards category; How do you handle an "array bounds exceeded" error from an infile.get statement?...
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++; }
"The most common form of insanity is a combination of disordered passions and disordered intellect with gradations and variations almost infinite."