You asked:
Edit: And what is the difference between a static member initializer and non-static member initializer?
Not much different.
The intializer to initialize a static
member is a static member initializer.
The intializer to initialize a non-static
member is a non-static member initializer.
class foo
{
static int var2 = 20; // static member initializer
int var1 = 10; // non-static member initializer
};