Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Re: structure references in header files Message-ID: <557@brl-tgr.ARPA> Date: Wed, 11-Dec-85 10:16:14 EST Article-I.D.: brl-tgr.557 Posted: Wed Dec 11 10:16:14 1985 Date-Received: Fri, 13-Dec-85 20:03:59 EST References: <547@brl-tgr.ARPA> Organization: Ballistic Research Lab Lines: 20 OOPS! Please ignore my previous posting on this, which had the member types misdeclared. The idea was right but I was distracted while typing it. Here is the correct version: The approved way to declare two structs each of which has a member that is a pointer to the other type of struct, is: struct a; struct b { struct a *ap; /* BUG FIX */ }; struct a { struct b *bp; /* BUG FIX */ }; Yes, I know it looks unbelievable. This kludge is present precisely to handle this kind of problem.