pair<int, int> pairInsert(2, 3);
map<int, int> mapTest;
mapTest.insert(pairInsert);
mapTest[3] = 5;
mapTest[6] = 5;
int xx = mapTest[4];
for (map<int, int>::iterator it=mapTest.begin(); it!=mapTest.end(); it++)
{
cout << it->second;
cout << " ";
}
温馨提示:答案为网友推荐,仅供参考