fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. class Ca
  7.  
  8. {
  9. public:
  10.  
  11. Ca() {printf("\nCONST this = %p\n",(void *)this);}
  12. ~Ca() {printf("\n DEST this = %p\n",(void *)this);}
  13. };
  14.  
  15. void hgh(Ca v);
  16.  
  17. int main()
  18.  
  19. {
  20. Ca test;
  21. hgh(test);
  22. int v;
  23. cin>>v;
  24. return 0;
  25. }
  26.  
  27. void hgh(Ca v)
  28.  
  29. {
  30. printf("\nhgh() = %p\n",(void *)&v);
  31. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
CONST this = 0xbfdd775b

hgh() = 0xbfdd775c

 DEST this = 0xbfdd775c

 DEST this = 0xbfdd775b