You will have to initialize the static variable in a .cpp file and not in the class declaration.
When you declare a static variable in the class, it can used without instantiating a class.
//Header file
class Test
{
public:
static int j;
};
//In cpp file
//Initialize static variables here.
int Test::j = 0;
//Constructor
Test::Test(void)
{
//Class initialize code
}