1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
// multiset::emplace
#include <iostream>
#include <set>
#include <string>
int main ()
{
std::multiset<std::string> mymultiset;
mymultiset.emplace("foo");
mymultiset.emplace("bar");
mymultiset.emplace("foo");
std::cout << "mymultiset contains:";
for (const std::string& x: mymultiset)
std::cout << ' ' << x;
std::cout << '\n';
return 0;
}
|