So I read on a textbook that there are specific cases when the struct can change sizes when the endianness is changed. I am not sure, but I think that the example was
struct X { int a, char b };
Can someone explain if this is true ?
So I read on a textbook that there are specific cases when the struct can change sizes when the endianness is changed. I am not sure, but I think that the example was
struct X { int a, char b };
Can someone explain if this is true ?
A change in endianness means you are on a different system where the compiler is free to define padding, integer size and byte size which could all lead to a different struct size, but it would not be because of the endianness.