I am trying to read chunks of data from a file directly into a struct but the padding is causing too much data to be read and the data to be misaligned.
Do I have to man
If you are using a Microsoft compiler then explore the align pragma. There are also the alignment include files:
#include // your code here #include
GNU gcc has a different system that allows you to add alignment/padding to the structure definition.