Sender: nate AT cartsys DOT com Message-ID: <36B3CA64.E91A25A@cartsys.com> Date: Sat, 30 Jan 1999 19:13:40 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Forwards References: <78vcvh$ctr$1 AT news DOT global DOT co DOT za> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Jason Filby wrote: > > Hi all, > > I do I forward declare something so that the following code compiles: > > typedef struct _TESTOBJ TESTOBJ; /* Forward declaration??? */ > > typedef BOOL > (CALLBACK * FREEOBJPROC) > (TESTOBJ *pTestObj); > > typedef struct _TESTOBJ > { > FREEOBJPROC pFreeProc; > int abc; > } TESTOBJ; Something of the form struct foo; acts as a forward declaration. So you can say: struct _TESTOBJ; typedef struct _TESTOBJ TESTOBJ; and go from there. Then just don't typedef it again (just declare struct _TESTOBJ.) -- Nate Eldredge nate AT cartsys DOT com