I am trying to store float values that are being used for leaderboard values in a game. I want to read the values in from the file and save them to an array and if a new record is set, write that back to the file.
I have this section reading from the file into my float array:
My issue is that when try to write to the files it writes 0.00 for each float. I'm not sure if it's a writing problem but if I manually change the values of the floats in the file it reads them in correctly.
How do I correctly write an array of floats to a file?
Maybe you didn't close the file after you read it (and timeIn didn't go out of scope and close the file automatically). Then timeOut wouldn't be able to open it (for writing, at least).