| <<< map::insert | Index | Map summary >>> |
Use erase( key ) to remove an item:
typedef map< string, int > MapT;
MapT amap;
//...
int how_many_erased = amap.erase( "Fred" );
if ( how_many_erased == 1 ) {
// Fred was in the map, now he's not.
}
| <<< map::insert | Index | Map summary >>> |