fork download
  1. class Base {
  2. public:
  3. void method(Base*) { ; }
  4. };
  5.  
  6. class Derived : public Base {
  7. public:
  8. void anotherMethod() { method(this); }
  9. };
  10.  
  11. int main()
  12. {
  13. Derived myClass;
  14. myClass.anotherMethod();
  15. return 0;
  16. }
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty