The problem...... This is followed by the student id and then several marks student scored in various assessments, one per line. A small segment of the file might look like the following,,,,
2
S1234567
55
70
4
S2222222
96
67
88
88
So, according data presented in this file, the first student has 2 scores, student id is S1234567, and the assessment scores are 55 and 70. The second students has 4 scores, student id is S2222222, and the assessment scores are96, 67, 88 and 88.
So what I want to know is if I was asked to save this to an array and display in a meaningful way can I save it to a 2d array? Because number of columns changes in each row...
S1234567 55, 70
S2222222 96, 67, 88, 88
Is this possible?
structcapable of holding all the information for one student (including the variable number of marks), then figure out how to get the info from one record in the file to one object of that struct.std::map<std::string, std::vector<int>>make sense to me.