fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. vector<int> a;
  7. cout << sizeof(a) << endl;
  8.  
  9. for (int i = 0; i < 1000; i++) { a.push_back(i); }
  10. cout << sizeof(a) << endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
12
12