fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Cow
  5. {
  6. public:
  7.  
  8. void func_1() {cout<<"func_1() Cow"<<endl;}
  9. void func_1(int a) {cout<<"func_1(int a) Cow"<<endl;}
  10. };
  11.  
  12. class Whale : public Cow
  13. {
  14. public:
  15. using Cow::func_1;
  16. void func_1() {cout<<"func_1() Whale"<<endl;}
  17. };
  18.  
  19. int main()
  20. {
  21.  
  22. Whale whale;
  23.  
  24. whale.func_1(10);
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
func_1(int a) Cow