dimanche 25 août 2019

How can you allow duplicate keys but not duplicate values in c++ stl

Example:It should take in values for Key value 1 2 1 3 2 4 And size for this should be 3 But shouldn't allow Key value 1 2 1 2 2 4 In this case the size should be 2. I tried using multimaps but it doesn't work. I created a multimap as follows 'multimap, Int>m'

Aucun commentaire:

Enregistrer un commentaire