fork download
  1. #include <vector>
  2. #include <string>
  3. #include <cstring>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. string aS="hello world";
  11. std::vector<char> aC(aS.begin(), aS.end());
  12. aC.push_back(0);
  13. cout << &aC[0] << endl;
  14. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
hello world