fork download
  1. #include <list>
  2. #include <iostream>
  3.  
  4. int main() {
  5. std::list<int> alist;
  6. alist.push_back(0);
  7. alist.push_back(1);
  8. alist.push_back(2);
  9.  
  10. std::list<int>::iterator iter = alist.begin();
  11. std::cout << *iter << std::endl;
  12. --iter;
  13. std::cout << *iter << std::endl;
  14. }
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
0
-1078599472