fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. vector<int> v;
  9. v.resize(1);
  10. // alternatively
  11. // vector<int> v(1);
  12.  
  13. // alternatively
  14. // v.push_back(0);
  15. v[0] = 1;
  16. cout << "Hello" << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
Hello