You must add the following line in the implementation file:
int Foo::bar = you_initial_value_here;
This is required so the compiler has a place for the static variable.
You must add the following line in the implementation file:
int Foo::bar = you_initial_value_here;
This is required so the compiler has a place for the static variable.