Is it possible to set default values for some struct member? I tried the following but, it\'d cause syntax error:
typedef struct { int flag = 3; } MyStruct
An initialization function to a struct is a good way to grant it default values:
Mystruct s; Mystruct_init(&s);
Or even shorter:
Mystruct s = Mystruct_init(); // this time init returns a struct