I have the following struct:
struct type1 { struct type2 *node; union element { struct type3 *e; int val; }; };
Whe
element is the name of the union, not the name of a member of type1. You must give union element a name:
element
type1
union element
struct type1 { struct type2 *node; union element { struct type3 *e; int val; } x; };
then you can access it as:
struct type1 *f; f->x.e