Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::list< int > list;
- for ( auto it = list.begin(); it != list.end(); ++it )
- {
- if ( /* ... */ )
- {
- auto tmpIt = it; ++tmpIt;
- list.erase( it );
- it = tmpIt;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement