Here is code in log.h
file :
struct SUCC_CODE{
static const int RECOGNIZER_OK = 0;
};
The above piece of code in log.h
file throwing compiler error:
Type name does not allow storage class to be specified
Here is code in log.h
file :
struct SUCC_CODE{
static const int RECOGNIZER_OK = 0;
};
The above piece of code in log.h
file throwing compiler error:
Type name does not allow storage class to be specified
Struct members may not be static
. Remove that specifier, and the compiler should stop complaining. This question explains that it is a valid specifier in C++.
C doesn’t allow you to use static
within a struct. It’s not even clear what that would mean in a C struct.