Check out example codes for "map insert c++". It will help you in understanding the concepts better.

Code Example 1

 // initialize container 
    map<int, int> mp; 
  
    // insert elements in random order 
    mp.insert({ 2, 30 }); 
    mp.insert({ 1, 40 }); 
  
    auto it = mp.find(2); 
  
    // inserts {3, 6} starting the search from 
    // position where 2 is present 
    mp.insert(it, { 3, 60 }); 
  

Code Example 2

mymap.insert ( std::pair<char,int>('a',100) );

Learn ReactJs, React Native from akashmittal.com