Mail Archives: djgpp/2002/02/04/11:16:23
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 -