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!tgr!txlutera@crdc.arpa From: txlutera@crdc.arpa (Thomas Luteran) Newsgroups: net.lang.c Subject: structure references in header files Message-ID: <531@brl-tgr.ARPA> Date: Tue, 10-Dec-85 21:40:10 EST Article-I.D.: brl-tgr.531 Posted: Tue Dec 10 21:40:10 1985 Date-Received: Thu, 12-Dec-85 05:17:12 EST Sender: news@brl-tgr.ARPA Lines: 30 I have a problem with a header file that contains typedefs similar to those below in that both contain a reference to the other. The problem stems from the fact second structure will be undefined (not properly defined) when the first typedef tries to reference it: typedef struct car { int numdoors; char color[8]; char owner[20]; . . . struct garage *parked; <- using LOT here for struct garage won't struct car *next; } AUTO; work! typedef struct garage { char location[20]; . . . struct car *customers; struct garage *next; } LOT; Please send any replies directly to me - Thanks in advance! Tom