1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
// unordered_multiset::find
#include <iostream>
#include <string>
#include <unordered_set>
int main ()
{
std::unordered_multiset<std::string> myums =
{"cow","cow","pig","sheep","pig"};
std::unordered_multiset<std::string>::iterator it = myums.find("pig");
if ( it != myums.end() )
std::cout << *it << " found" << std::endl;
return 0;
}
| |