藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月6日 10:18


dereferencing pointer to incomplete type是什麼錯誤?

「dereferencing pointer to incomplete type」是什麼錯誤?
I use gcc to compile my C file.

dereferencing pointer to incomplete type是什麼錯誤?

-->

你的指針,有一個類型,這個類型是不完全的。也就是說,你只給出了這個類型的聲明,沒有給出其定義。你這裡的類型多半是結構,聯合之類的東西。

把代碼貼上來。

dereferencing pointer to incomplete type是什麼錯誤?

這句是定義
struct sockaddr_in my_addr, their_addr, broadcaster_addr,multicaster_addr;

這句是主函數中用到的,然後報錯。
   broadcaster_addr.sin_addr      = *((struct in_addr*)broadcaster_he->;h_addr);

dereferencing pointer to incomplete type是什麼錯誤?

估計頭文件沒有被正確包含。

-->

這是聲明。

dereferencing pointer to incomplete type是什麼錯誤?

呵呵,看了大俠的回復,突然想起原來在VC下寫的時候把ne't'd'b。h的庫給註釋掉了,難怪報錯。呵呵,現在加上了,就沒錯了。謝謝大俠。

dereferencing pointer to incomplete type是什麼錯誤?

再請教一下這個錯誤呢?
two or more data types in declaration of `timerHandler'

這是代碼:
void timerHandler(int signum);       

原來用過的,也沒出錯,但是現在不知道為什麼就有上面的錯了。:(
謝謝大俠你啦,來,親一下:)

dereferencing pointer to incomplete type是什麼錯誤?

dereferencing pointer to incomplete type是什麼錯誤?

-->

這種錯誤應該碰到過,但記不起來了,不是很清楚。



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com