LPC2132學(xué)習(xí)中遇到的問題2
void PutStr(uint8 x, uint8 y, uint8* str);
我們在主函數(shù)中有這樣的用法:
PutStr(0, 0, "Hello world!");
經(jīng)編譯后,有如下錯誤:
Error: C3028E implicit cast of pointer to non-equal pointer
解決方法如下:
PutStr(0, 0, (uint8*)"Hello world!");
即將我們的字符串強(qiáng)制轉(zhuǎn)換為我們在函數(shù)中所定義的形式。
PS:
C3028E: implicit cast of pointer to non-equal pointer
本文引用地址:http://www.ex-cimer.com/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".
評論