C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 15th, 2003, 01:55 PM
campbel8 campbel8 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 24 campbel8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation 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

Reply With Quote
  #2  
Old February 15th, 2003, 02:45 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,824 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 1 h 9 m 26 sec
Reputation Power: 446
Re: Compile Error

Quote:
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Compile Error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway