fork(18) download
  1. #include <vector>
  2. #include <string>
  3. #include <iostream>
  4.  
  5. int main()
  6. {
  7. std::vector<std::string> s = {"a", "b", "c"};
  8. s.push_back("d");
  9.  
  10. std::cout << "The vector now holds " << s.size() << " strings\n";
  11. }
Success #stdin #stdout 0s 3064KB
stdin
Standard input is empty
stdout
The vector now holds 4 strings