I have a union that is defined like this:
typedef union {
enum {
REVISION = 0,
CURRENT_VERSION = REVISION
};
enum FLAGS{
FLAG_DEFAULT = 0x00000000,
FLAG_EOD = 0x00000001,
FLAG_OUTOFORDER = 0x00000002
};
CHAR _filler[32];
struct INTERNAL_STRUCTURE {
UINT16 type;
UINT16 flags;
};
}CORRHDR
How do I access the member's of INTERNAL_STRUCTURE from my code?
I've thought I could just do this:
CORRHDR hdr;
hdr.INTERNAL_STRUCTURE.type = 1;
I'm wrong. I can see the enums in the union, but nothing else. Could someone explain the structure (or benefit) of this type to me?