codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <iostream> #include <iterator> #include <algorithm> int main() { std::list<int> intList; std::front_insert_iterator<list<int> > it(intList); *it = 10; *it = 20; *it = 30; std::inserter(intList, intList.begin()) = 40; std::inserter(intList, intList.begin()) = 50; std::inserter(intList, intList.end()) = 60; std::copy(intList.begin(), intList.end(), std::ostream_iterator<int>(cout, "\n")); return 0; }
Private
[
?
]
Run code
Submit