i want to assign what is read from a text file to an int. In the text file there will only be 1 number such as 1000 or 3023. I want to do this to have a High Score system in my black jack game, any ideas?
here is the code i am using to read from a file
if ( fp != NULL )
while ( (highscore = fgetc( fp )) != EOF )
putchar( highscore );
fclose( fp );
i would like to assign the number that is read to an int.