3 ms·
Usually it does not matter as you keep items of the same type or know the type and exact compiler. Unless you want to write them somewhere or put it as part of
by AstralStorm 8y ago
Usually it does not matter as you keep items of the same type or know the type and exact compiler.
Unless you want to write them somewhere or put it as part of API and ABI. Which you probably shouldn't.
- scoutt 8y agoIt's true that types has something to do with it, but the main issue is padding. While I can keep the same type (i.e. uint8_t), it's the padding following uint8_t var[3] that may vary according on packing options when compiling. http://www.catb.org/esr/structure-packing/#_structure_alignment_and_padding http://www.catb.org/esr/structure-packing/#_structure_alignm...