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