[問題] 指標指到NULL的問題
我現在正在整合一份code
有個struct 如下
typedef struct i2c_feusb_t {
void* handle ;
i2c_listener_t* pListener ;
void* user ;
} i2c_feusb_t ;
func_result_t drvi2c_feusb_Read (i2c_t * pI2c, uint8_t
deviceAddress, uint8_t * pData, uint32_t size, uint8_t mode)
{
int result = 0 ;
i2c_feusb_t* feusb = NULL ;
....
}
每次只要跑到 = NULL那行就出現error
error訊息是can not convert i2c_feusb_t to void
這個錯誤訊息有什麼含意嗎..?
請問該怎麼解決呢
上面的code是用C寫的
我要整合到一個.NET的project去
在COM object的一個member function需要執行上面的function
卡了好久
試過把NULL 改成 (void*)0
結果還是一樣..
拜託版上高手給我點建議
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 66.75.28.157
※ 編輯: littlehau 來自: 66.75.28.157 (06/23 13:02)
→
06/23 13:09, , 1F
06/23 13:09, 1F
→
06/23 13:09, , 2F
06/23 13:09, 2F
→
06/23 19:38, , 3F
06/23 19:38, 3F
→
06/23 22:21, , 4F
06/23 22:21, 4F
→
06/23 22:49, , 5F
06/23 22:49, 5F
→
06/23 22:49, , 6F
06/23 22:49, 6F
→
06/24 15:42, , 7F
06/24 15:42, 7F
→
06/24 15:42, , 8F
06/24 15:42, 8F