Odd. I have a struct like this:
and the sizeof() it is 64. Right. So I decided I needed to add a bool to it so I made the string 47 and added it, like so:Code:struct Old { int a; char str[48]; int b; int c; int d; };
But the sizeof() the new struct is 68. Why? With the new struct it won't go back down to 64 until I decrease the size of str to 44.Code:struct New { int a; char str[47]; int b; int c; int d; bool x; };
I'm compiling with Borland and think there just must be some details about structs that I am unaware of. Have you any clue?