解答3:
for(map<string, itemstruct>::iterator i = mymap.begin(); i != mymap.end();)
{
if(i->second.a > 100)
i = mymap.erase(i);
else
++i;
}
解答4: VC6中编译map编译出错的解决方法
Warnings similar to the following are generated even if you use the warning pragma to disable the warning: warning C4786: 'std::rb_tree<CAiSpanningTree<State,std::less<State>>::TransClosureNode, CAiSpanningTree<State,std::less<State>>::TransClosureNode,std::ident<Cai SpanningTree<State,std::less<State>>::TransClosureNode,CAiSpanningTree<S tate,std::less<State>>::TransClosureNode>,std::less<CAiSpanningTree<Stat e,std::less<State>>::TransClosureNode>>' : identifier was truncated to '255' characters in the debug information