fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct C {
  5. C() {}
  6.  
  7. C(const C& other) {
  8. printf("My new address is %p", this);
  9. }
  10. };
  11.  
  12. int main() {
  13. C c1;
  14. C c2 = c1;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
My new address is 0xbfb8c5ff