how to insert key and value in map in c++ in a function code example Example: c++ map insert mymap.insert ( std::pair<char,int>('a',100) );