Hi,
I have an enum like:
Code:
typedef enum mac_type_e {
STATIC_MAC,
BLACKLIST_MAC
} mac_type_t;
and I want to use this type in a structure that's declared like:
Code:
typedef struct lan_mac_s {
UINT16 lanmacid;
enum mac_type_t lan_mac_type_pp; // user mac type per port, 20 mac_type_t array, 0 = static, 1 = blacklisted
now, the compiler tells me:
Code:
incomplete type is not allowed
enum mac_type_t lan_mac_type_pp; // user mac type per port, 20 mac_type_t array, 0 = static, 1 = blacklisted
^
but funny enough, if I remove the preceeding "enum" keyword, it compiles fine. But since I'm wrioting C and not C++, I really should put it there, I'm surprised why it wouldn't let me, aany ideas?