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