#include <stdio.h>
typedef struct test {
enum en {
zero, one
} en;
} test;
int main(){
test t;
// t.en = test::one; <-- How can I accomplish this?
return 0;
}
test::one is a C++ syntax and won't compile in C.
Is it possible to access en from outside the struct in C?
I know I can use integers here like t.en = 1; but I'm trying to use enum values.