Well, TheBook
, maps int
onto a vector
of NameGrades
, which means:
TheBook[int] = vector<NameGrades>;
Start with one GradeCatagories
object: grade_cat
grade_cat.category = "Exam";
grade_cat.grade = 95;
Now place it in a vector
:
vector<GradeCategories> vgc;
vgc.push_back(grade_cat);
Now we can move on to NG
:
NG.name = "Bob Jones";
NG.v = vgc;
Now we can insert it into a vector
:
vector<nameGrades> vng;
vng.push_back(NG);
Finally, we can insert it into the map:
TheBook tb;
tb[12345017] = vng;