fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include<string>
  4. using namespace std;
  5. int main ()
  6. {
  7. vector<string > myints;
  8. cout << "0. size: " << myints.size() << '\n';
  9.  
  10. for (int i=0; i<10; i++) myints.push_back("hello");
  11. cout << "1. size: " << myints.size() << '\n';
  12.  
  13.  
  14. myints.pop_back();
  15. cout << "3. size: " << myints.size() << '\n';
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
0. size: 0
1. size: 10
3. size: 9