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