When should we use packsize to specify the structure of the layout?

advertisements

Sometimes I think we can specify pack size to specify the layout of the struct. I am wondring if there is any case we must specify pack size?


When you need the memory layout to match exactly a binary format defined elsewhere, eg. file formats or network protocols.