Regarding structure padding in c++
问题 I use a datastructure in my project and in the context of a paricular structure i have a doubt about strucure padding. First Look at the strucure given below. I use Visual Studio 2008 compiler. typedef struct tagDATA_PACK { DWORD dDataLength; BYTE bFlags; BYTE bAttrib; BYTE bOffset; }DATA_PACK; Question1: How much is the size of the above structure? it shows 8 bytes. it is correct. But, consider the modified structure given below? typedef struct tagDATA_PACK { DWORD dDataLength; BYTE bFlags;