fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct base
  5. {
  6. void foo(int){}
  7. };
  8.  
  9.  
  10. struct der: base
  11. {
  12. void foo(){}
  13. };
  14.  
  15. int main() {
  16.  
  17. der d;
  18. d.foo(10);
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:18:10: error: no matching function for call to 'der::foo(int)'
  d.foo(10);
          ^
prog.cpp:12:7: note: candidate: void der::foo()
  void foo(){}
       ^
prog.cpp:12:7: note:   candidate expects 0 arguments, 1 provided
stdout
Standard output is empty