After the while loop at line 17 completes, we know that myfile.eof() must be true.
Thus the loop at line 23 can never execute. The array index[10] contains uninitialised data, attempting to use these values for any purpose will give unpredictable results.
Also, the if statement at line 35 is incomplete, the code doesn't compile.