fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. const char *p = "abc123456";
  10. std::vector<std::string> v;
  11. v.push_back(std::string(p+3, 5));
  12. std::cout << v[0];
  13. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
12345