I want to create a bit datatye in c language. I tried creating it using a structure with bitfield
struct bittype {
unsigned int value:1;
};
typedef struct bittype bit;
But the problem with this is I have to use variables like
bit statusVariable;
statusVariable.value = 1;
How can i define a variable directly like,
bit statusVariable;
statusVariable = 1;