dimanche 20 janvier 2019

check if value already exists in multimap c++

How do i find out that a Multimap already contains a specific value, and how to find the total number of items containing same key?

std::multimap<float,int> obj;
obj.insert ( std::pair<char,int>('a',100) );
obj.insert ( std::pair<char,int>('a',100) );

For example if i want to check if given multimap obj contains 100 value already how do i check it and how to get that number of items containing the character a is 2?

Aucun commentaire:

Enregistrer un commentaire