fork(3) download
  1. /// see also http://stackoverflow.com/q/28110509/2932052
  2. #include <iostream>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. vector<const char*> vc = {"hello","world"};
  9. cout << vc[0] << " " << vc[1] << endl;
  10.  
  11. vector<string> vs(vc.begin(), vc.end());
  12. cout << vs[0] << " " << vs[1] << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
hello world
hello world