1
0
Fork 0
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.
uni-m.cds-adv-prog/ex7.3/main_list.cpp
Eric Teunis de Boone d9cbe495da Finished ex7.*
2020-01-06 15:20:05 +01:00

17 lines
246 B
C++

#include <list>
int main() {
std::list<int> l;
// Fill List
for (int i = 0; i < 10000000 ; i++) {
l.push_back(i);
}
for ( auto iter = l.begin(); iter != l.end(); iter++ ) {
if ( *iter % 3 == 0 ) {
iter = l.erase( iter );
}
}
}