Mail Archives: djgpp/1998/08/11/23:55:53
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
- Raw text -