typedef struct foo_s { int a; } foo; typedef struct bar_s { foo; int b; } bar;
Essentially I want to do:
bar b; b.a; <
You can try using inheritance:
struct foo_s { int a; }; struct bar_s: foo_a { int b; };
Works in C++, not sure if it works in C.