The member variable of a static struct in C
I have a question about the member variables of static struct in C language. Someone said we can declare a static struct , but in C, struct do not have the static members like class in C++, what does this mean? If I declare a static struct, what is the status of the members variable? can some one help me on this? Note that a static struct itself is different from a static member of a struct. While you can declare a static struct variable: static struct MyStruct s; you can't define a struct type with a static member: struct MyStruct { static int i; // <- compiler error }; The reason for this is