Duplicate:
What happens if you call erase on a map element while iterating from begin to end
I have a map map1<string,vector<string>>
i have a iterator for this map "itr".
i want to delete the entry from this map which is pointed by "itr".
i can use the function map1.erase(itr); after this line the iterator "itr" becomes invalid.
as per my requirement in my project,the iterator must point to the next element. can any body help me regerding this
thans in advance:)
santhosh