fork download
  1. class A
  2. {
  3. public:
  4. void func_1() {}
  5. };
  6.  
  7. class B : public A
  8. {
  9. public:
  10. void func_1(int a) {}
  11. };
  12.  
  13. int main()
  14. {
  15. B b;
  16.  
  17. b.func_1();}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:17:10: error: no matching function for call to 'B::func_1()'
 b.func_1();}
          ^
prog.cpp:10:16: note: candidate: void B::func_1(int)
           void func_1(int a) {}
                ^
prog.cpp:10:16: note:   candidate expects 1 argument, 0 provided
stdout
Standard output is empty