Page 178 -
P. 178
data in files and arrays
You somehow forgot the surfer names
With your rush to catch some waves before the light is gone, you forgot
about the other piece of data stored in the results.txt file: the
name of each surfer.
Without the names, you can’t possibly know which score goes with which
name, so the scoreboard is only half-complete.
The trouble is, your array stores one data item in each element, not
two. Looks like you still have your work cut out for you. There’ll be no
catching waves until this issue is resolved.
How do you think you
can remember the names
Name Score
You forgot to and the scores for each
process the Johnny 8.65
names. surfer in the contest?
Juan 9.12
Joseph 8.45 Once you've thought
Stacey 7.81 about this problem, turn
Aideen 8.05 over to Chapter 5 and
Zack 7.21 see if you can resolve
Aaron 8.31
this issue.
you are here 4 143