+ 6
What is structure padding?
I heard about the term structure padding related to memory of members... is it same like int and char are two members... then both would consider 4 and 4 bytes instead of 4 and 1 byte...?
3 odpowiedzi
+ 8
If you are transferring binary data between servers that are written in different languages, this is another instance of when you need to be aware of automatic padding.
+ 4
~ swim ~ I guess you have given example.... but is it int , char and float causing problem....? because char is having three bytes left which cannot accomodate next float...
does this mean that if only two members were present like int and char, would it result into 5 bytes only...?
or else does it mean that order of data member int,float , char would result into 9 bytes only...?
or in any case padding would happen at all...?
+ 2