Message-Id: <199808120355.EAA08180@sable.ox.ac.uk> Comments: Authenticated sender is From: "George Foot" To: Endlisnis Date: Wed, 12 Aug 1998 04:54:24 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Trouble with many mallocs and reallocs Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Precedence: bulk On 11 Aug 98 at 17:28, Endlisnis wrote: > Bruno Barberi Gnecco wrote: > > > struct node { > > struct node *forward, *back; > > unsigned char *data; > > }; > > typedef struct node NODE; > > Why do you use a typedef to reference 'node' as 'NODE'? > node a; //SAME AS > NODE a; He didn't, he typdeffed `struct node' as `NODE'. > PS: You don't need to use the word 'struct' when declaring node pointers, you can > just say node*. In C++ that is true, but in C you need an explicit typedef before you can do that. -- george DOT foot AT merton DOT oxford DOT ac DOT uk