code is
struct {
protected:
static int labelCounter;
};
code is
struct {
protected:
static int labelCounter;
};
protected members can be assigned in methods that belong to the class, or any derived class.
Your static member can be initialized normally, but you have to give a name to the struct:
struct MyStruct { protected: static int labelCounter; };
// .cpp:
int MyStruct::labelCounter = 12;