×
嵌入式 > 嵌入式开发 > 详情

LPC2132学习中遇到的问题2

发布时间:2020-10-22 发布时间:
|
在使用ADS1.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

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".



『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
单片机系统的EMC测试