F
Fred
Given a struct
typedef struct MyStruct {
SomeType var;
/* other members */
} MyStruct;
is it guaranteed that sizeof(MyStruct) includes sufficient
padding such that the next byte AFTER a variable of type
MyStruct will be aligned properly to hold a new variable of
type SomeType ?
I presume this must be so since otherwise there could be
problems accessing members of a MyStruct array.
typedef struct MyStruct {
SomeType var;
/* other members */
} MyStruct;
is it guaranteed that sizeof(MyStruct) includes sufficient
padding such that the next byte AFTER a variable of type
MyStruct will be aligned properly to hold a new variable of
type SomeType ?
I presume this must be so since otherwise there could be
problems accessing members of a MyStruct array.