Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site genix.UUCP
Path: utzoo!watmath!clyde!floyd!cmcl2!lanl-a!unm-cvax!unmvax!genix!ldl
From: ldl@genix.UUCP
Newsgroups: net.lang.c
Subject: Re: typedef in c
Message-ID: <555@genix.UUCP>
Date: Tue, 28-Feb-84 18:11:32 EST
Article-I.D.: genix.555
Posted: Tue Feb 28 18:11:32 1984
Date-Received: Fri, 2-Mar-84 11:11:44 EST
References: <319@aecom.UUCP>
Organization: Genix, Ltd., Albuquerque, NM
Lines: 35


	typedef struct
	{
		newtyp *member;
	}       newtyp;

	I finally had to do something along these lines
	
	typedef struct stupid
	{
		struct stupid  *member;
	}       newtyp;

					Jeremy Sanders
		{philabs|pegasus|esquire|cucard}!aecom!{sanders|jsanders}

Unfortunately, just knowing that something is a pointer isn't good enough
for C.  It insists on knowing 'pointer to what'. (Pascal does allows for
the case that knowing that something is a pointer is enough. Something for
the new standard?).  I'm sure I'll be flamed for this, but, what I do in a
case like this is:

	#define	NEWTYP	struct newtyp
	typedef NEWTYP
	{
		NEWTYP *member;
	}       newtyp;

It does exactly what you 'resorted' to, but is a bit easier (for me) to read.
-- 
Spoken: Larry Landis
USnail: 5201 Sooner Trail  NW
        Albuquerque, NM 87120
MaBell: (505)-898-9666
  UUCP: {ucbvax,gatech,parsec}!unmvax!genix!ldl