fork(2) download
  1. class A {
  2. public:
  3. virtual int methodA() = 0;
  4. virtual int methodB() = 0;
  5. virtual int methodC() = 0;
  6. };
  7.  
  8. class B { //B implements A.A() and A.B()
  9. public:
  10. int methodA() { return 0; };
  11. int methodB() { return 0; };
  12. };
  13.  
  14. class C : public A, public B {
  15. public:
  16. int methodA() { return B::methodA(); }
  17. int methodB() { return B::methodB(); }
  18. int methodC() { return 0; }; //C implements A.C()
  19. };
  20.  
  21. int main()
  22. {
  23. C c;
  24. return c.methodA();
  25. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty