fork download
  1. #include <iostream>
  2.  
  3. class A1
  4. {
  5. public:
  6. void draw(){ std::cout << "A1::draw()"; }
  7. };
  8.  
  9. class A2
  10. {
  11. public:
  12. void draw(){ std::cout << "A2::draw()"; }
  13. };
  14.  
  15. class A : public A1, public A2
  16. {};
  17.  
  18. int main()
  19. {
  20. A a;
  21. a.A1::draw();
  22. }
  23.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
A1::draw()