LPC2132学习中遇到的问题2
void PutStr(uint8 x, uint8 y, uint8* str);
我们在主函数中有这样的用法:
PutStr(0, 0, "Hello world!");
经编译后,有如下错误:
Error: C3028E implicit cast of pointer to non-equal pointer
解决方法如下:
PutStr(0, 0, (uint8*)"Hello world!");
即将我们的字符串强制转换为我们在函数中所定义的形式。
PS:
C3028E: implicit cast of pointer to non-equal pointer
本文引用地址:https://www.eepw.com.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".
评论