fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct X {
  5. int i;
  6. X() {
  7. cout << "X() of " << this << endl;
  8. X(1);
  9. }
  10. X(int i) : i(i) {
  11. cout << "X(int) of " << this << endl;
  12. }
  13. };
  14.  
  15. int main() {
  16. X x;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
X() of 0xbf9df828
X(int) of 0xbf9df82c