#include
#include
#include
using namespace std;
typedef multimap::value_type CIT;
typedef multimap::const_iterator IT;
template
void show(IT&it,multimap&r)
{
for(it=r.begin();it!=r.end();++it)
cout<first<second<
}
int main()
{
multimapphone;
phone.insert(CIT("朱然","6464684684684"));
phone.insert(CIT("朱然","64646"));
phone.insert(CIT("朱然","64646846"));
IT ii;
cout<
show(ii,phone);
cout<
ii=phone.find("朱然");
typedef pair PAIR;
PAIR p=phone.equal_range("朱然");
for(IT i=p.first;i!=p.second;++i)
{
cout<first<second<
}
system("pause");
return 0;
}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/xtayaitak/archive/2010/10/27/5968090.aspx