I would like to force the compiler to allocate one byte for a specific enumeration. I googled around, and found that the HP C compiler supports the following syntax:
long long enum bigger_enum {barge, yacht}; /* 8-byte enum type */
enum default_enum {ERR1, ERR2, ERR3, ERR4};/* 4-byte enum type */
long enum big_enum {STO, ST1, ST2, ST3}; /* 4-byte enum type */
short enum small_enum {cats, dogs}; /* 2-byte enum type */
char enum tiny_enum {alpha, beta}; /* 1-byte enum type */
Unfortunetly I am using VC .net 03 which doesn't appear to support it. I am getting the following 2 compiler errors:
Quote:
c:\*** : error C2236: unexpected 'enum' 'Class::Type'
c:\*** : error C2208: 'Class::Type' : no members defined using this type
Does anyone know of anyway to force the enumeration size in VC .net? Help would be much appreciated, Thanks.
EDIT: cleaning up source