i need a try catch block i presume so if my teacher tests with an empty file or a file that has too many variables to go into it. it doesnt blow up and i am clueless with try/catch/throw blocks.
Code:int load_array(ifstream& in, int file_data[], int arraysize)
{
int i = 0;
in >> file_data[i++];
while( !in.eof() && i < arraysize)
in >> file_data[i++];
return i;
}