This repository has been archived on 2021-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
|
#include <list>
|
|
|
|
int main() {
|
|
std::list<int> l;
|
|
|
|
// Fill List
|
|
for (int i = 0; i < 10000 ; i++) {
|
|
l.push_back(i);
|
|
}
|
|
|
|
for ( auto iter = l.begin(); iter != l.end(); iter++ ) {
|
|
if ( *iter % 3 == 0 ) {
|
|
iter = l.erase( iter );
|
|
}
|
|
}
|
|
|
|
}
|