c++ map删除元素

    typedef std::map<std::string,float> StringFloatMap;
    StringFloatMap col1;
    StringFloatMap::iterator pos;

    for(pos = col1.begin();pos!=col1.end();){
        if(pos->second == value)
            col1.erase(pos++);
        else{
            ++pos;
        }
    }

  

posted @ 2013-08-09 21:59  OpenSoucre  阅读(2791)  评论(0编辑  收藏  举报