P
puzzlecracker
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<string> vec;
multimap<stirng, int> myMap
// populate myMap
multimap<string, int >::iterator iter = myMap.begin();
while(iter != myMap.end())
{
vec.push_back(iter->first)
}
more syntactically clear with copy function.
Here is what I do and would like to if someone has a cleaner solution:
vector<string> vec;
multimap<stirng, int> myMap
// populate myMap
multimap<string, int >::iterator iter = myMap.begin();
while(iter != myMap.end())
{
vec.push_back(iter->first)
}