map insert c++

C++
  mymap.insert ( std::pair<char,int>('a',100) ); // 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 }); 
  
Source

Also in C++: