Josif_tepe

Untitled

May 15th, 2026
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. #include <list>
  3. using namespace std;
  4.  
  5. int main(){
  6.     list<int> l = {1, 3, 4, 2, 5};
  7.  
  8.     cout << l.front() << endl;
  9.     cout << l.back() << endl;
  10.     cout << *next(l.begin(), 2);
  11.  
  12.     return 0;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment