I am wondering how many bits (in memory) are used for a declared enum type?
e.g. int is 32 bits
bool is 1 bit
enum??
At enum, is it dependent on how many values it can take, e.g.
{ true, false} would take 1 bit,
{one, two, three} 2 bits
{1,2,...,n } would take log(2)n bits.
etc.
??
I have to make a huge array. Each element must contain a certain parameter, and I can use either an enum type with three values or two bool variables.
I was wondering whether it would be better to use two bool variables or one enum with 3 values?
Thank you!