乱写的

hash_multimap 中搜索指定的key对应的元素,最方便的是用 equal_range(_Key) 方法,它返回的是元素的区间迭代器,类似于下面这样
 
std::pair <Type::const_iterator, Type::const_iterator> pitPair;
 
后面这么写就搞定了:
 
pitPair= Type.equal_range(_Key);
Type::const_iterator it = pitPair.first;
 while (it != pitPair.second)
 {
   it++;
 }
 
比他妈的自己发明轮子强多了
原文地址:https://www.cnblogs.com/skogkatt/p/4163216.html