www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/04/11:16:23

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
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: <kinghuang-0D63B9 DOT 23404830012002 AT news DOT uncensored-news DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 1020131110358 DOT 26396N-100000 AT is>
NNTP-Posting-Host: h-207-148-144-39.dial.cadvision.com
Mime-Version: 1.0
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
<eliz AT is DOT elta DOT co DOT il> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019