Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: struct a <---> struct b Message-ID: <7221@brl-smoke.ARPA> Date: 8 Feb 88 12:56:22 GMT References: <173@heurikon.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <173@heurikon.UUCP> lampman@heurikon.UUCP (Ray Lampman) writes: >What is the best way to declare three different structures, >each containing a pointer to the other two? I keep running >into a forward referencing error. struct b; /* incomplete types for forward reference */ struct c; struct a { struct b *bp; struct c *cp; } as; struct b { struct c *cp; struct a *ap; } bs; struct c { struct a *ap; struct b *bp; } cs;