Qt Code:
QMap<int, QString>::Iterator it; for( it = mapCity.begin(); it != mapCity.end(); ) // remove increment here { if( it.key() < 4 ) mapCity.remove( it++ ); // this is ok; note POSTFIX operator here else ++it; }To copy to clipboard, switch view to plain text mode
Bookmarks