fork download
  1. #include <iostream>
  2. #include <list>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. list<int> my = {99, 3,99, 2, 99};
  8. my.remove(99);
  9. for(auto it = my.begin(); it != my.end();it++)
  10. cout <<*it<<" ";
  11. return 0;
  12. }
Success #stdin #stdout 0s 5512KB
stdin
Standard input is empty
stdout
3 2