Hi all,
I'm having trouble setting the size of an enumerated type when it's set as a typedef:-
The above is a condensed version - there are more message types, but way less than 256 of them and I'd like to tell the compiler to treat this as a byte rather than the default int (I'm using GCC).Code:typedef enum { MT_NULL, MT_ACK, MT_PING, MT_BYE, MT_GETINFO } messageType;
Is there a method to do this as inline code? I have other enumerated types which are ints and work fine - I don't want to break those by setting a global compiler value.
Many thanks.