Modify the input file like this :
run
5.3
skierg
1
erg
2
run
7
skierg
0.54
skierg
0.34
run
2
erg
1
erg
0.75
run
9
We are going back a bit, and we should so that we can fully diagnose the problem. In the first version, apply this code : while (getline(megaFile, activityType))
Unfortunately, I am doing this for an assignment- it will be submitted to an autograder, which will provide its own files that I will be unable to alter.
That code printed:
Hooray!!!
Type : (activity, distance)
Distance : "0"
Ah, figured it out- changed the while loop to
while (!megaFile.eof( ))
and added a header skipper before it, and it now includes the whole page.
Thank you.