Mail Archives: djgpp/1998/05/25/10:31:29
Victor Viudez Gonzalez wrote:
>
> Sorry guys, but I'm a newbie using DJGPP, and I have a little problem.
> That's it:
>
> I have a file.h like this:
>
> typedef struct TAD{
> int code;
> struct TAD next;
> struct TAD prior;
> .
> .
> }Tad;
>
> Ok, now I would use this new structure in my program... I
> write an
> #include "file.h", right. But the gcc compiler says that typedef
> struct is not valid.
>
> How I can define a new type?????
>
> Thanks a lot!!
>
> PS.: Ah! I use Rhide!
Try
typedef struct TAD {
int code;
struct TAD *next; // note the *
struct TAD *prior; // noter the *
} Tad;
Tad myTad;
Or, more simply:
struct Tad {
int code;
Tad *next;
Tad *prior;
};
Tad MyTad;
--
Robert Paulsen ICQ 11815732 http://paulsen.home.texas.net
If my return address contains "ZAP." please remove it. Sorry for the
inconvenience but the unsolicited email is getting out of control.
- Raw text -