I've done it through manually enumerating the types that I know of, but I'd like to make it more robust than that.

Code:
struct foo {
    ...
     int type;
    ...
};

struct foo bar;

bar.type = int;
That's what I'd LIKE to do. Is there a way?

Andy