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