fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main() {
  5. std::vector<int> v(10);
  6. auto it = v.begin();
  7. *it = 42;
  8. for(const auto& x : v) {
  9. std::cout << x << std::endl;
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5300KB
stdin
Standard input is empty
stdout
42
0
0
0
0
0
0
0
0
0