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

Code Example 1

it=mymap.find('b');
mymap.erase (it);                   // erasing by iterator
mymap.erase ('c');                  // erasing by key

Learn ReactJs, React Native from akashmittal.com