1, map的两种遍历
<span style="font-size:14px;"> map<string,int>::iterator it;
for(it=MAP.begin();it!=MAP.end();++it){
cout<<it->first<<" "<<it->second/100<<endl;
}
while(!MAP.empty()){
cout<<(MAP.begin()).first<<(MAP.begin()).second<<endl;
MAP.erase(MAP.begin());
}</span>
2,set的插入
set<int> s;
s.insert(2);
set的遍历
set<int> ::iterator it;
for(it=s.begin(); it!=s.end; it++)
cout<<*it<<endl;