Hi All,
I am trying to understand the concept behind bitmap. I need to know how many bytes the structure containing bitfield occupy.
For example,
struct {
unsigned int A : 2;
unsigned int AA : 2;
unsigned int AAA : 2;
}mystruct;
here in the above case, what will be the sizeof mystruct ??? If i change the data type of the member , say AAA , to double then how it will affest the size. Or suppose i say unsigned int AAA : 32 then what will be the effect.
I did not get the memory picture in this case. Please help.
Thanks in advance.
Sanjay
I am trying to understand the concept behind bitmap. I need to know how many bytes the structure containing bitfield occupy.
For example,
struct {
unsigned int A : 2;
unsigned int AA : 2;
unsigned int AAA : 2;
}mystruct;
here in the above case, what will be the sizeof mystruct ??? If i change the data type of the member , say AAA , to double then how it will affest the size. Or suppose i say unsigned int AAA : 32 then what will be the effect.
I did not get the memory picture in this case. Please help.
Thanks in advance.
Sanjay