Re: [問題] 在structure裡面宣告的問題
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):