thanks in advance for taking a look. I've onlye taken 2 classes of c++, now.. so, still working out the details of hierarchy and classes, etc, in my mind. So please forgive me, if I sound completely ignorant.
I am currently designing a sort of category list program.
I am thinking of using vector, for the array of array of array with pointers..
so far, I have the following hierarchy
1 - main category (array of pointers to Lists)
2 - List (array of pointers to Items)
3 - Item (array of pointers to Records)
4 - Record (actual item record)
question: I want my List to contain additional data. lets take an example, if my Items were tests/exams, then records would contain the grades. (or seems, I can just keep the grade with the Item? )
The question about additional data, inside the List, is where I would like to keep the average of all grades, under that particular List.
If it's a pointer of to another array, it would not be possible? or would it?
I hope I am making sense.
The question rephrased though, is that.. if my arrays are pointers to other arrays, how can I keep data within a higher level array, like in my "List" class?
further broken down.
List contains "Student 1"
Item contains "Student 1: Grade 1"
Item contains "Student 1: Grade 2"
List will have "average of type double", of Student 1's, grade 1 and grade 2..
I think the best place to put that, into is within, List.
If its a pointer to Student 1, how can I keep that average data, within the List?
thanks so much for reading, and thinking about my problem. I appreciate it so much.
Thanks so much, Galik. Taking in, what you suggested, I am perceiving, in order to have a higher order, I can do the following? Does it look, like a do-able structure below?
But it also depends on what you want to do with it. I assume this is a skeleton and that your struct record will contain more than just the grade? Perhaps the date of the test or something?
The reason why is because you have many grade records for each test. Is it like that to convey that the same test was taken multiple times? For instance if the test was "Maths", the student may have taken several Maths tests during the year, getting a different grade each time.