| ftp.delorie.com/archives/browse.cgi | search | 
| Message-ID: | <35697D38.DD633DB@imailbox.com> | 
| From: | "Robert C. Paulsen, Jr." <paulsen AT ZAP DOT imailbox DOT com> | 
| Organization: | . | 
| MIME-Version: | 1.0 | 
| Newsgroups: | comp.os.msdos.djgpp | 
| Subject: | Re: I'm a Newbie with DJGPP! | 
| References: | <356974FF DOT D01A46C AT est DOT fib DOT upc DOT es> | 
| Lines: | 33 | 
| Date: | Mon, 25 May 1998 14:16:25 GMT | 
| NNTP-Posting-Host: | 209.99.40.25 | 
| NNTP-Posting-Date: | Mon, 25 May 1998 09:16:25 CDT | 
| To: | djgpp AT delorie DOT com | 
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp | 
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.
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |