Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <list>
- using namespace std;
- int main() {
- list<int> l1;
- l1.push_front(1);
- l1.push_front(2);
- l1.push_front(3);
- l1.push_back(4);
- l1.push_back(5);
- for(list<int>::iterator it = l1.begin(); it != l1.end(); it++) {
- cout << *it << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment