fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. vector<int>arr;
  5.  
  6. signed main(){
  7. arr.resize(1,10);
  8. int*pt=&arr[0];
  9. cout<<*pt<<endl;
  10. arr.resize(100);
  11. cout<<*pt<<endl;
  12. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
10
0