mercredi 4 septembre 2019

How to delete a repetead value in a multimap c++?

I have a multimap filled with these elements (key, value):

PROJECTONE,asdsa

PROJECTTWO,asdsa

PROJECTTHREE,hello

PROJECTFOUR,asdsa

I want to delete all the elements of the multimap with the same value, it doesn´t matter if the key is different as you see in the example. In this example, i need to delete projectone, projecttwo and projectfour because they have the same value (asdsa).. so the output when i print the multimap is only:

PROJECTTHREE,hello

Aucun commentaire:

Enregistrer un commentaire