LPC2132学习中遇到的问题2

嵌入式系统 时间:2016-11-23来源:网络
在使用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".

关键词: LPC2132字符

加入微信
获取电子行业最新资讯
搜索微信公众号:EEPW

或用微信扫描左侧二维码

相关文章

查看电脑版