多重映射

#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<<"/t"<second<<"/n"; } int main() { multimapphone; phone.insert(CIT("朱然","6464684684684")); phone.insert(CIT("朱然","64646")); phone.insert(CIT("朱然","64646846")); IT ii; cout<<"遍历whole ele"< PAIR; PAIR p=phone.equal_range("朱然"); for(IT i=p.first;i!=p.second;++i) { cout<first<<"/t"<second<

你可能感兴趣的:(c++全方位学习进度,iterator,string,include,system,class)