class Helloworld{ public: static int x; void foo(); }; // uncomment to fix //int Helloworld::x; void Helloworld::foo(){ Helloworld::x = 10; }; int main() { return 0; }
Standard input is empty
/home/PBjAw9/ccefhKg5.o: In function `Helloworld::foo()': prog.cpp:(.text+0x2): undefined reference to `Helloworld::x' collect2: error: ld returned 1 exit status
Standard output is empty