fork download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main() {
  6. string source = "hello";
  7. char destination[50];
  8. strcpy(destination, source.c_str());
  9. cout << destination << endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
hello