D
Daniel Rudy
Consider the following two code fragments:
Example 1:
typedef struct datatype_tag
{
char section[64];
char name[64];
char value[1024];
datatype_t *next;
} datatype_t;
Example 2:
typedef struct datatype_tag
{
char section[64];
char name[64];
char value[1024];
struct datatype_tag *next;
} datatype_t;
Now the first one generates a syntax error from gcc. The second one
works just fine. Why?
I'm thinking it has to do with me using the typedef'd identifier in the
middle of the typedef declaration? If that's the case, will it be ok
with the second form?
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep
Example 1:
typedef struct datatype_tag
{
char section[64];
char name[64];
char value[1024];
datatype_t *next;
} datatype_t;
Example 2:
typedef struct datatype_tag
{
char section[64];
char name[64];
char value[1024];
struct datatype_tag *next;
} datatype_t;
Now the first one generates a syntax error from gcc. The second one
works just fine. Why?
I'm thinking it has to do with me using the typedef'd identifier in the
middle of the typedef declaration? If that's the case, will it be ok
with the second form?
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep