fork(2) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector<int> v {1, 2, 3, 4};
  9.  
  10. for (x : v)
  11. cout << x << endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1
2
3
4