LPC2132學(xué)習(xí)中遇到的問(wèn)題2
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://m.butianyuan.cn/article/201611/320130.htmC3029E: implicit cast of non-0 int to pointer
C3030E: implicit cast of pointer to int
C3031E: implicit cast of
Try re-writing the code to avoid the implicit cast, e.g. add an explicit cast.
These errors can be suppressed with "-Ec".
評(píng)論