I have a file with record times, i need take each time and compare it whit the actual player time, so if the player time is < then the best time:input player time on top, if is >, then compare whit the next time and so...
the problem is until now i was using a switch to convert char to int, like:
case '1': myint =1; break;
but thats very boring, long and not efficient...(and if i use this method, i will have to create 60 cases for seconds, hours and min)
Now Im very confused..my recordes file is a text file:
name-----------------------------------00:00:00
name-----------------------------------00:00:00
name-----------------------------------00:00:00
So my first question is, theres a way where i can get a char and pass it to a int whithout getting the ascii value but the number itself?(and vice-versa)
If i want write or read int values to a file, this file can be a text file?
Is that the situation where i have to use binary i/o?
What i want to do is get the int hour,int min and int sec from the file, and
write a int hour, int min and int sec to the file.