X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: Linked Lists Help! Date: Mon, 04 Feb 2002 09:07:25 -0700 Organization: Systematic Software Lines: 54 Message-ID: <8l8s5u8rlgss6imb2qhu0ceifbs5cbjlji@4ax.com> References: NNTP-Posting-Host: h-207-148-144-39.dial.cadvision.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news3.cadvision.com 1012838846 17003 207.148.144.39 (4 Feb 2002 16:07:26 GMT) X-Complaints-To: news AT cadvision DOT com NNTP-Posting-Date: Mon, 4 Feb 2002 16:07:26 +0000 (UTC) X-Newsreader: Forte Agent 1.9/32.560 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 31 Jan 2002 11:06:03 +0200 (IST), Eli Zaretskii wrote: > >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 { typedef struct qdWindow { to match the references within the struct, or remove struct from before qdWindow elsewhere in your program -- you may also want to check the definition of qdPort in case it needs a similar change >and the problem should go away. -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca) fake address use address above to reply tosspam AT aol DOT com abuse AT aol DOT com abuse AT yahoo DOT com abuse AT hotmail DOT com abuse AT msn DOT com abuse AT sprint DOT com abuse AT earthlink DOT com abuse AT cadvision DOT com abuse AT ibsystems DOT com uce AT ftc DOT gov spam traps