fork download
  1. #include <iostream>
  2.  
  3. struct foo
  4. {
  5. void print_me()
  6. {
  7. std::cout << this << '\n';
  8. }
  9. };
  10.  
  11. int main()
  12. {
  13. foo a;
  14. std::cout << &a << '\n';
  15. a.print_me();
  16. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
0xbfc6aa6d
0xbfc6aa6d