I’m trying to create a database. I want to store names and ID’s along with course information and grades. For each ID there needs to be multiple courses stored. To do this I’m thinking of using a map of vectors. Assigning an ID to use as a key for the map and then the vector to store the course information etc. I have all in a class inheritance system that goes Abstract Base Class>Student>Degree (includes course info etc). Is this the best way of doing this seeing as I can’t dynamically create class instances?
Edit:
Say I have a class foo, and want to create new instances of it.
X=1
"Would you like to add a new user?: y"
foo newuserX
"Would you like to add another user?: y"
foo newuserX++
......
`foo newuserX++
You could just use a multimap to store multiple values for a key, and then iterator over the values when looking for the courses corresponding to a ID.