line 30: why is that a double instead of an int ? Do exam IDs contain decimal places ?
line 39: assert does nothing if the program is not compiled for debug. And it does not stop the program if the file fails to open. In otherwords, its not useful for what you are trying to use it for. Instead you should test for valid opening
if( !infile.is_open())
{
cout << "File not opened\n";
return 1; // don't continue the program
}
line 48: I don't know what you want to do in that switch statement.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343