新闻中心

EEPW首页 > 嵌入式系统 > 设计应用 > LPC2132学习中遇到的问题2

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

本文引用地址:https://www.eepw.com.cn/article/201611/320130.htm

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字符

评论


技术专区

关闭