delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/25/19:31:25

From: "Martin Ambuhl" <mambuhl AT tiac DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: I'm a Newbie with DJGPP!
Date: Mon, 25 May 1998 19:18:38 -0400
Organization: Nocturnal Aviation
Lines: 33
Message-ID: <6kctud$1eu@news-central.tiac.net>
References: <356974FF DOT D01A46C AT est DOT fib DOT upc DOT es>
NNTP-Posting-Host: p0.tc1.newyo.ny.tiac.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Usenet posts should be in plaintext, not HTML.  IT just produces
garbage for many readers.  Change the struct so it does not have
recursive members.  Your form leads to infinite recursion and a
struct of infinite size.  (e.g. use `struct TAD *next, *prior;').
This is not a djgpp question.  Your code is invalid C.
===================================
    Victor Viudez Gonzalez wrote in message
<356974FF DOT D01A46C AT est DOT fib DOT upc DOT es>...
    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
{ 
                                                  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! 




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019