map::at 查找具有指定键值的元素
#include <iostream>
#include <map>
using namespace std;
int main()
{
map <string,int> M;
M.insert(map<string,int>::value_type("Scottding",1));
M.insert(map<string,int>::value_type("DHL",2));
M.at("Scottdin")++;
for(map<string,int>::iterator iter = M.begin();iter != M.end();++iter)
cout<<iter->first<<" "<<iter->second<<endl;
return 0;
}