Why doesn’t the compiler pack structs for you if it’s as easy as shuffling around based on type?
replies(1):
For example, you might take the block of memory and data and send it to another system that will decode it. Or you can take the block of memory and store it in a file or in a hardware device where it means something in this specific order.