这两个陈述有什么区别?

时间:2017-07-28 11:49:18

标签: c++ templates stl

while(t--) {
    int key,value;
    cin>>key>>value;
    MyMap[key]=value;//inserting into a map
}

while(t--) {
    int key,value;
    cin>>key>>value;
    MyMap.insert(make_pair(key,value));//inserting into a map
}

0 个答案:

没有答案
相关问题