Hey guys, beginner here making his first post so apologies if I make this more confusing than it needs to be.
So here's the problem, I was given this Student class. A user will insert a name followed by a double representing a GPA. The user will enter these in pairs followed by the word "STOP". With each name and GPA, I have to create a Student pointer and insert it into the "students" vector. I must print all the GPAs in the vector in reverse order.
I've got this far, but the output comes out as:
3.9
Kenny
3.65
George
2.8
Bob
When it should be:
3.9
3.65
2.8
How should I go about removing the names from the output?
You have forgotten reading into the gpa. Thus, if you input a student's name followed by the GPA, then your GPA input is pushed back as anoter Studen's name.