cbpporter Messages: 1427 Registered: September 2007
Ultimate Contributor
The size of 16 is correct. There are very good technical reasons for it to be so and Novo pointed out some links. Unless you have very good reasons to use an unaligned/packed struct, I would recommend against it.
One thing that you could try is reorder the elements. There is this old trick of ordering elements, with the largest/more alignment constrained ones first. So put the double first, then the int, then the char.
If you are using binary storage an rely on fixed size (like 13) the solution is to read/write each field separately.