[ERROR]
Static members of a local class have no linkage and cannot be defined outside the class declaration. It follows that a local class cannot have static data members.
void foo(void){
class A{
public:
static int a; // ERROR because static data member
static void myFct(void); // OK because static method
};
}
Remove the static specifier from the data member declarations of any local class.
void foo(void){
class A{
public:
int a; // OK because data member.
static void myFct(void); // OK because static method
};
}