+ 1
Why does this code print garbage values
can't figure out the problem https://code.sololearn.com/ckrsSHD6waUs/#cpp
11 Respuestas
+ 10
https://code.sololearn.com/cvoN75D6tgwS/#cpp
+ 8
Have you checked the file to see if it has any contents?
+ 2
Wow so simple. Lol that was really frustrating me thanks
+ 1
You write string length, string, score, yet read string length, score, string.
+ 1
Yes Jay I see the string in text in the file but everything else is binary
+ 1
The order does match
+ 1
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
0
Where are you trying to run it?
0
I'm trying to running it on codeblocks
0
I'm using those variables so I can read back the data from the file but it does not work
0
Your order writing must match reading.