Undefined reference to static variable c++

Hi i am getting undefined reference error in the following code: class Helloworld{ public: static int x; void foo(); }; void Helloworld::foo(){ Helloworld::x = 10; }; I don't wan...