fork(2) download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. int main() {
  5. std::vector<int> v = {1,2,3,4,5};
  6. for(auto it = v.rbegin(); it != v.rend(); ++it) {
  7. std::cout << *it << '\n';
  8. }
  9.  
  10. return 0;
  11. }
Success #stdin #stdout 0s 4252KB
stdin
Standard input is empty
stdout
5
4
3
2
1