Answers for "stl map remove item"

C++
0

stl map remove item

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

mymap.erase ('c');                  // erasing by key

it=mymap.find ('e');
mymap.erase ( it, mymap.end() );    // erasing by range
Posted by: Guest on January-20-2021

Browse Popular Code Answers by Language