fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A
  5. {
  6. public:
  7. string m_S;
  8. A(string x): m_S(x){};
  9. };
  10.  
  11.  
  12. int main() {
  13. A a("test string");
  14. A b = a;
  15. cout << b.m_S << endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
test string