I am working on this assignment, where for this part I am simply reading the file and saving it into a struct array. I am posting the main arguments of the array, and I will post the output. It seems to me that it is saving it and displaying it as binary, yet it should not be. I believe that there is a mistake in probably my "build array" function. Any help is appreciated
Source code:
//THE FOLLOWING IS THE REFRENCE TO BUILD ARRAY
//*********************************************
int buildArray( Player players[] )
{
Player onePlayer;
ifstream inputFile;
int i = 0;
int numPlayers;
inputFile.open( "binary_hockey", ios::binary );
if ( inputFile.fail() )
{
cout << "The binary_hockey input file did not open"; //failsafe to check file
exit(-1);
}
Player Name | Goals | Assists | Rating | Points
------------------------------------------------------------------------------
Press Enter to return to Quincy...
L B, oddly enough, that is a required code given by the teacher for this assignment, I know its terrible coding, but I've caught many errors in her "given codes"