J
JustSomeGuy
I have an 8 bit byte in which two bits are used and the remaining 6 are
unused.
#pragma pack(1)
typedef struct
{
unsigned int item_len;
unsigned char presentationContextID;
unsigned char unused : 6;
unsigned char command : 1;
unsigned char last : 1;
} pdv_type;
Does this syntax look correct?
unused bits 7,6,5,4,3,2
command bit 1
last bit 0
Will the compiler try to put the bit field into a 16 or 32 bit holder?
unused.
#pragma pack(1)
typedef struct
{
unsigned int item_len;
unsigned char presentationContextID;
unsigned char unused : 6;
unsigned char command : 1;
unsigned char last : 1;
} pdv_type;
Does this syntax look correct?
unused bits 7,6,5,4,3,2
command bit 1
last bit 0
Will the compiler try to put the bit field into a 16 or 32 bit holder?