#: 17256 S3/Languages
14-Dec-92 20:31:41
Sb: #17255-C question
Fm: Bob van der Poel 76510,2203
To: Bill Dickhaus 70325,523 (X)
Bill, hope we're not working on the same project . I had to something which
I think is what you are asking. Code like:
struct {
char sc;
int si;
char *spc;
}teststruct;
char *test=&teststruct.spc;
Does produce the correct results with the 68K compiler. Don't know about the
6809... Oh, and remember that the above is NOT the best way to structure the
structure. 3 padding bytes are inserted inbetween 'sc' and 'si' for alignment.
You're best off to put the chars and shorts at the end of the structure. Mixing
chars and ints really eats up lots of memory when using structures.
|