deleting entries from the map using iterator
map<string , string>::iterator drrMapIter;
char caFleet[23];
...............
some where in the code drrInternelUserStatusMap got some entries
...............
...............
for (drrMapIter = drrInternalUserStatusMap.begin(); drrMapIter != drrInternalUserStatusMap.end(); )
{
getFleetFromUfmi(drrMapIter->second.c_str() , caFleet );
if ( !strcmp ( fleet.c_str() , caFleet ) )
{
LOG_L5 (( "\nCFL: Fleet Entry is found and deleting that fleet: %s" , caFleet ));
drrInternalUserStatusMap.erase ( tmpDrrMapIter++ );
}
else
{
drrMapIter++;
}
}
Above code is dumping core: following is that info:
#0 0x080667b9 in std::_Rb_tree_base_iterator::_M_increment (this=0xb68753b0)
at stl_tree.h:137
#1 0x08090695 in std::_Rb_tree_iterator<std::pair<std::string const, std::string>, std::pair<std::string const, std::string>&, std::pair<std::string const, std::string>*>::operator++ (
this=0xb68753b0) at stl_tree.h:207
Help me in resolving this issue.

