C
copx
Hi, I remember hearing that the size of a struct can be bigger
than the sum of the sizes of its contents. Is that true?
For example let's say char is 1 byte and int is 4 byte in this case
and I've a struct defined like this:
struct pak_directory_entry_struct {
char file_name[56];
int file_position;
int file_length;
};
Is the size of this struct guaranteed to be 64 bytes
in this case or not?
copx
than the sum of the sizes of its contents. Is that true?
For example let's say char is 1 byte and int is 4 byte in this case
and I've a struct defined like this:
struct pak_directory_entry_struct {
char file_name[56];
int file_position;
int file_length;
};
Is the size of this struct guaranteed to be 64 bytes
in this case or not?
copx