#include <iostream>using namespace std; class foo{public: static void bar();}; void bar(){ // out class definition foo::bar() std::cout<<"FooBar\n";}; int main() { // your code goes here foo::bar(); //bar();//removed return 0;}
Standard input is empty
/home/JyqzDX/ccER7kHB.o: In function `main': prog.cpp:(.text.startup+0x5): undefined reference to `foo::bar()' collect2: error: ld returned 1 exit status
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!