Hello, I have a file I need to read from, with student names, their class, and their grades in the class. Right now, the code I have can read the first 3 students correctly, but once it gets to the fourth, it starts using grades from previous students.
Smith, White, and Brown are all read in correctly, but for Scoop instead of reading in 45 57 26 79 54 52 74 60 45, it is reading in 75 80 72 90 84 100 50 96 76 for the 9 grades.
So how would I clear out g1-g9 for when the second person in that class is being read in?
Probably has something to do with the extraction stream. I don't know if this will fix it, but you should use getline for those string variables of filenames.