fork download
  1. #include <iostream>
  2.  
  3. struct foo {
  4. virtual int moo() {return 0;}
  5. };
  6.  
  7.  
  8. struct bar {
  9. virtual int goo() {return 1;}
  10. };
  11.  
  12. int main(void) {
  13. std::cout << &foo::moo
  14. << " " << &bar::goo;
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
1 1