Re: [問題] 在structure裡面宣告的問題

看板C_and_CPP作者 (miss you ~)時間12年前 (2012/05/02 17:43), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《sean823823 (eojdkf)》之銘言: : 開發平台(Platform): (Ex: VC++, GCC, Linux, ...) : NotPad++ : 問題(Question): : 如題,Debug這段很久了,還是看不出哪裡有出錯, : compiler是說前兩行出錯了, : 我猜是指標(*)出錯了, : 請各位幫我看看, : 謝謝!! : 錯誤結果(Wrong Output): : 錯誤:expected 「)」 before 「*」 token : 錯誤:expected 「;」 before 「s8int」 : 程式碼(Code):(請善用置底文網頁, 記得排版) : s8int (*init ) (device_t* dev); : s8int (*close) (device_t* dev); : s8int (*open) (device_t* dev, : u16int open_flag); : u32int (*read) (device_t* dev, : u32int pos, u32int size, : void* buffer); : u32int (*write) (device_t* dev, : u32int pos, u32int size, : const void* buffer); : s8int (*ctrl) (device_t* dev, u8int cmd, : void *args); typedef char s8int; typedef unsigned char u8int; typedef unsigned int u32int; typedef unsigned short u16int; typedef void device_t; 我隨便假設那些不懂的東西 用 gcc -c 是可以的 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.30.46

05/04 13:53, , 1F
謝謝!!
05/04 13:53, 1F
文章代碼(AID): #1FeG7R3q (C_and_CPP)
文章代碼(AID): #1FeG7R3q (C_and_CPP)