[Cs3] Lab 05

Mikhail Nesterenko mikhail at cs.kent.edu
Mon Jun 29 11:46:58 EDT 2015


> Prof. Nesterenko,
> 
> For lab 5 with the associative containers, I have everything working
> well except for the case where two students share the same last
> name. Since we are storing the last name as the key value for either
> the map or unordered_map, doesn???t each key value have to be unique
> unless you are using a multimap? So when attempting to insert into
> the map with a second equal key value, it will not allow it as
> find() doesn???t point to end() correct? I suppose you could
> possibly store multiple first names under the same key, but it might
> get tricky keeping track of the enlisted classes. What are your
> thoughts?
> 
> Thank you!


Assume all students have different last names.
-- 
Mikhail


More information about the cs3 mailing list