Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <list>
- using namespace std;
- int main(){
- list<int> myList;
- myList.push_back(10);
- myList.push_back(20);
- myList.push_front(5);
- cout << "List elements: ";
- for (int x : myList){
- cout << x << " ";
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment