fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. class A {
  7. public:
  8. static double test_code(const A& a);
  9.  
  10. };
  11.  
  12. class B : public A {
  13. public:
  14. B(int i) { };
  15. static double test_code2(const B& b);
  16. };
  17.  
  18. A::test_code(2);
  19. B::test_code2(2);
  20.  
  21. return 0;
  22.  
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:18: error: no matching function for call to ‘main()::A::test_code(int)’
prog.cpp:8: note: candidates are: static double main()::A::test_code(const main()::A&)
stdout
Standard output is empty