Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef enum Type {
- A,
- B
- } type_t;
- typedef struct A {
- ...
- } a_t;
- typedef struct B {
- ...
- } b_t;
- typedef struct Thing {
- type_t type;
- union
- {
- a_t a;
- b_t b;
- };
- } thing_t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement