Why C++ map.insert() doesn't overwrite

前端 未结 5 1411
误落风尘
误落风尘 2021-01-17 20:25

In the code below:

#include 
#include 
#include 

using namespace std;

int main(){
  pair p1(1,1);
         


        
5条回答
  •  不要未来只要你来
    2021-01-17 21:10

    In the std::map::insert reference it is said that:

    Inserts element(s) into the container, if the container doesn't already contain an element with an equivalent key.

提交回复
热议问题