Data type inside struct for bit define

Thread Starter

ep.hobbyiest

Joined Aug 26, 2014
201
Hello,
i get confuse when i do define struct of bits. Means 2 bits for Var_1, 3 bits for Var_2, 4 bits for Var_4 and so on..
so what is variable is to define wheather char, unsigned char , int or something else..
my example as follows.
Code:
struct 
{
 unsigned char Var_1:1;
char Var:2;
int Var:3;
};

so what is good to use. Any how we need only bits.
 
Top