I am using while loop for that but I am sure you can do it quicker and
more syntactically clear with copy function.
Here is what I do and would like to if someone has a cleaner solution:
vector<stringve c;
multimap<stirng , intmyMap
// populate myMap
multimap<string , int >::iterator iter = myMap.begin();
while(iter != myMap.end())
{
vec.push_back(i ter->first)
}
more syntactically clear with copy function.
Here is what I do and would like to if someone has a cleaner solution:
vector<stringve c;
multimap<stirng , intmyMap
// populate myMap
multimap<string , int >::iterator iter = myMap.begin();
while(iter != myMap.end())
{
vec.push_back(i ter->first)
}
Comment