It seems to me that a static class variable is identical to an extern variable, because you only declare it in the static int x
/ extern int x
statement, and actually define it elsewhere (usually in a .cpp file)
static class variable
// .h file
class Foo
{
static int x ;
} ;
// .cpp file
int MyClass::x = 0 ;
Extern variables:
// .h file
extern int y;
// .cpp file
int y = 1;
In both cases the variable is declared once somewhere, and defined in a file that will not be included more than once in the compilation (else linker error)