Why does this code print garbage values
can't figure out the problem https://code.sololearn.com/ckrsSHD6waUs/#cpp
Have you checked the file to see if it has any contents?
Wow so simple. Lol that was really frustrating me thanks
You write string length, string, score, yet read string length, score, string.
Yes Jay I see the string in text in the file but everything else is binary
The order does match
line 25 writes string length line 26 writes string contents line 28 writes score line 38 reads string length line 39 reads score line 44 reads string contents move 28 to follow 25
Where are you trying to run it?
I'm trying to running it on codeblocks
I'm using those variables so I can read back the data from the file but it does not work
Your order writing must match reading.