I am using a BIT filed varibale in a struct to Modify the size of the data type. I need this struct to be exactly equals 1. According to my calculations it is equal to 10 but when I use the sizeof() operator I get 12. How should I overcome this problem.
typedef uint8_t BYTE;
typedef int32_t DWORD;
typedef uint32_t LONG;
typedef uint16_t WORD;
typedef struct
{
LONG id:24; //"ID3"
WORD version; // $04 00
BYTE flags; // %abcd0000
LONG size; //4 * %0xxxxxxx
}ID3TAG;