Thread: Compile Error

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    24
    Rep Power
    0

    Compile Error


    Hi,

    I tried searching the archives for this topic, but I couldn't find an explanation. I am trying to compile a program. When I compile it, I get the following error:

    "dereferencing pointer to incomplete type"

    The line that is causing this error is:
    pType = ntohs(e->eh_type);

    where pType and eh_type are unsigned short variables.

    Can someone please explain to me what causes this type of error? Thank-you
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,184
    Rep Power
    2222

    Re: Compile Error


    Originally posted by campbel8
    Hi,

    When I compile it, I get the following error:

    "dereferencing pointer to incomplete type"

    The line that is causing this error is:
    pType = ntohs(e->eh_type);

    where pType and eh_type are unsigned short variables.
    The message would make me think that there might be something wrong with the declaration of e's struct.

    However, the Hungarian notation looks suspicious. Are you sure that pType is an unsigned short and not a pointer to an unsigned short? The name suggests strongly that it is a pointer.

IMN logo majestic logo threadwatch logo seochat tools logo