[問題] 在structure裡面宣告的問題
開發平台(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);
置底文網頁:
http://ideone.com/3cShy
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 134.208.2.150
※ 編輯: sean823823 來自: 134.208.2.150 (05/01 17:30)
推
05/01 17:50, , 1F
05/01 17:50, 1F
→
05/01 18:39, , 2F
05/01 18:39, 2F
→
05/01 18:40, , 3F
05/01 18:40, 3F
推
05/01 21:47, , 4F
05/01 21:47, 4F
→
05/02 13:36, , 5F
05/02 13:36, 5F
→
05/02 13:37, , 6F
05/02 13:37, 6F
推
05/02 16:31, , 7F
05/02 16:31, 7F
※ 編輯: sean823823 來自: 134.208.2.150 (05/03 19:06)
※ 編輯: sean823823 來自: 134.208.2.150 (05/03 19:07)
推
05/03 20:18, , 8F
05/03 20:18, 8F
推
05/03 21:01, , 9F
05/03 21:01, 9F
推
05/04 00:05, , 10F
05/04 00:05, 10F
→
05/04 00:06, , 11F
05/04 00:06, 11F
→
05/04 00:07, , 12F
05/04 00:07, 12F
→
05/04 13:48, , 13F
05/04 13:48, 13F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):