1// remove from list
2#include <iostream>
3#include <list>
4
5int main ()
6{
7 int myints[]= {17,89,7,14};
8 std::list<int> mylist (myints,myints+4);
9
10 mylist.remove(89);
11
12 std::cout << "mylist contains:";
13 for (std::list<int>::iterator it=mylist.begin(); it!=mylist.end(); ++it)
14 std::cout << ' ' << *it;
15 std::cout << '\n';
16
17 return 0;
18}