Please post your code inside
[code
] tags in the future. It is much easier to read code that way.
theirGrades is a member vector in oneStudent, not gradbook, so you need to specify which student the "theirGrades" variable is part of.
So
CODE
thisClass[student_choice-1].theirGrades.resize(numGrades);
I think that should work.
EDIT:
Also, you have a "numGrades" in both the gradbook and student objects. That doesn't quite make sense, at least in the way you implemented it.
Right below the bolded part, you use "numGrades" when you should really be using "thisClass[studend_choice-1].numGrades", otherwise you are just going to keep increasing a value in the gradbook, then you are going try to access outside of your vectors and you'll get errors.
You just need to work on remembering what classes have what properties.
Per
This post has been edited by pertheusual: 1 Apr, 2008 - 07:47 PM