I am writing a program for a class of mine to pull a students initials as well as a list of their letter grades from a file and calculate their gpa. In the file there is one student and their grades per line. Each student can have an infinate amount of grades, and their could be an infinate amount of students. I am having trouble with starting a new students gpa. The only way I can think of would be to check for the end of a line. The only problem with this is I am using a string to take the initials and grades from the file and using a char to check for '\n' would be off set, due to the string reaching the end of the line before the char. If anyone could help me figure out a way to solve this it would be much appreciated.
Thanks,
TimNick
PS: if you wish to see my code I can PM it to you.