I have a c++ structure:
struct a
{
char b;
int c;
int d[100];
};
The size of the struct should be 405 bytes.
I saw that the size of the struct is 408 bytes. The reason is the alignment to 8 bytes after the integer "c". The array "d" should start at the 6th byte of the struct and not at the 9th byte.
I used #pragma pack(1)
but it didn't solve the problem.
I cannot change the order of fields in the struct.
Do you have any idea how can I solve this problem?
Thanks!