Diego Acevedo wrote:
How do I assess members of a typedef struct?
Example:
typedef struct {
Int16 data1;
Int32 data2;
Char stringData[20];
} MyRecordType;
How would I assess the stringData member?
Thanks,
Diego Acevedo
There is no such thing as a `typedef struct'. What you have done above
is create a synonym for the anonymous struct you've defined.
Of course, as there are no such types as `Int16', `Int32' and `Char' in
standard C, I would "assess" the `stringData' member as meaningless.
If you want to *access* a member, it's simple. If you have an instance
of the struct, you use the `.' operator, if you have a pointer to an
instance you use the `->' operator.
But first, you read the FAQ and get a *good* book to use as a reference
(see
http://www.accu.org for suggestions).
HTH,
--ag
--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com http://www.cafepress.com/goldsays
"If you have nothing to hide, you're not trying!"