Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

為什麼為什麼@@

0 views
Skip to first unread message

衝吧!!

unread,
Oct 28, 2002, 10:23:39 AM10/28/02
to
為什麼 ??
typedef struct list_node *list_pointer;
typedef struct list_node {
list_pointer link;
};

在 VC 6.0 下compile會出現
warning C4091: 'typedef ' : ignored on left of 'struct list_node'
when no variable is declare

有人能告訴我那裡錯了嗎? 謝謝
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>

尚未認證通過

unread,
Oct 28, 2002, 11:13:19 PM10/28/02
to
《 在 forma...@bbs.cis.nctu.edu.tw (衝吧!!) 的大作中提到: 》
: 為什麼 ??

: typedef struct list_node *list_pointer;
: typedef struct list_node {
: list_pointer link;
: };
: 在 VC 6.0 下compile會出現
: warning C4091: 'typedef ' : ignored on left of 'struct list_node'
: when no variable is declare
: 有人能告訴我那裡錯了嗎? 謝謝

因為它找不到 struct list_node的結構定義!
所以應該:
typedef struct list_node {
struct list_node *link ;
} ;
typedef struct list_node *list_pointer ;

這樣才會先有struct的定義!!

--
[m [1;35m※ 來源:‧蛋捲廣場 bbs.tku.edu.tw‧[FROM: 210.80.71.251] [m

0 new messages