fork(2) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class Test{
  7. public:
  8. string str;
  9.  
  10. Test(const string& str) : str(str){
  11. cout << this->str << endl;
  12. }
  13. };
  14.  
  15. int main() {
  16. Test t ("test");
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 2984KB
stdin
Standard input is empty
stdout
test