FurryGuy, I'm having a problem with that condition.
Let's say I just want to enter 5 different grades. I enter the 5 different grades: (100 75 78 88 94), then I enter the -1 to end the loop. This tells my vector that there are 6 values instead of the 5 I want to store.
... because you need to ignore the remainder of the input line containing the student's name. Otherwise, the getline in your program just reads the remainder of the line containg the student's name, and there is nothing after the student's name on that line.