fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. std::string Exec(const char* cmd){
  6. cout<<cmd<<endl;
  7. return "hey";
  8. }
  9.  
  10. int main() {
  11. std::string s="hello";
  12. const char * c = s.c_str();
  13. Exec(c);
  14. return 0;
  15. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
hello