討論串[問題] Unsigned *char 轉 int .
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓6(6推 0噓 28→)留言34則,0人參與, 最新作者NAMESTANLY (Stanley~ New life)時間14年前 (2011/09/05 18:52), 編輯資訊
0
0
0
內容預覽:
我描述一下大概的code.. unsigned char *sbuf=NULL;. int key=0 ;. sbuf=xxx(); #某個Function return的 unsigned char. key=atoi(sbuf);. 這樣的話compile 會有error message. 如:
(還有138個字)

推噓1(1推 0噓 15→)留言16則,0人參與, 最新作者NAMESTANLY (Stanley~ New life)時間14年前 (2011/09/05 16:46), 編輯資訊
0
0
0
內容預覽:
請問一下有辦法用Unsigned *char轉int嗎?. 本來想說使用atoi.. 但是只能用const char 轉int. 所以不知道還有沒有其他方法可行呢?. 還是有方法可以將unsigned char 轉 const char?. 麻煩大大解惑. --. 發信站: 批踢踢實業坊(ptt
首頁
上一頁
1
下一頁
尾頁