X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 31 Jan 2002 11:06:03 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: Linked Lists Help! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 31 Jan 2002, King Chung Huang wrote: > typedef struct { > // metadata > char name[256]; // window title name > unsigned short x; // x co-ordinate position of the window > unsigned short y; // y co-ordinate position of the window > unsigned short width; // width of the content region (local) > unsigned short height; // height of the content region (local) > short isDirty; // does the window need updating? > > // content data > struct qdPort *qdRef; // the qdPort > > // links > struct qdWindow *above; // next window above > struct qdWindow *below; // next window below > } qdWindow; > [...] > The problem i'm having is that when i go to compile, every line that has > "newWindow -> (some field) = (something)" generates the error > "dereferencing pointer to incomplete type". That's because your `typedef' declaration doesn't name the struct, only the typedef. The struct is anonymous. Change this line: typedef struct { into this: typedef struct qdwindow { and the problem should go away.