新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > LPC2132學(xué)習(xí)中遇到的問題2

LPC2132學(xué)習(xí)中遇到的問題2

作者: 時(shí)間:2016-11-23 來源:網(wǎng)絡(luò) 收藏
在使用ADS1.2編譯程序的過程中,我們有函數(shù)如下定義:
void PutStr(uint8 x, uint8 y, uint8* str);
我們?cè)谥骱瘮?shù)中有這樣的用法:
PutStr(0, 0, "Hello world!");
經(jīng)編譯后,有如下錯(cuò)誤:
Error: C3028E implicit cast of pointer to non-equal pointer
解決方法如下:
PutStr(0, 0, (uint8*)"Hello world!");
即將我們的字符串強(qiáng)制轉(zhuǎn)換為我們?cè)诤瘮?shù)中所定義的形式。
PS:

C3028E: implicit cast of pointer to non-equal pointer

本文引用地址:http://www.butianyuan.cn/article/201611/320130.htm

C3029E: implicit cast of non-0 int to pointer

C3030E: implicit cast of pointer to int

C3031E: implicit cast of to int

Try re-writing the code to avoid the implicit cast, e.g. add an explicit cast.
These errors can be suppressed with "-Ec".



關(guān)鍵詞: LPC2132字符

評(píng)論


技術(shù)專區(qū)

關(guān)閉