fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class foo{
  5. public:
  6. static void bar();
  7. };
  8.  
  9. void bar(){ // out class definition foo::bar()
  10. std::cout<<"FooBar\n";
  11. };
  12.  
  13. int main() {
  14. // your code goes here
  15. foo::bar();
  16. //bar();//removed
  17. return 0;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/JyqzDX/ccER7kHB.o: In function `main':
prog.cpp:(.text.startup+0x5): undefined reference to `foo::bar()'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty