zilog Guest
|
order of members inside struct |
Posted: Wed Jun 20, 2007 1:40 pm |
|
|
I want to have a struct where the relative order of the members is defined. Is this possible in C? Like below where I want "a" to accupy adress 0, b adress 1-2, c adress 3-6 and d adress 7. I have heard that the internal order of structs is not defined in c, can I make it defined somehow?
Code: |
struct {
int8 a;
int16 b;
int32 c;
int8 d;
} affe;
|
|
|