在运用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
Try re-writing the code to avoid the implicit cast, e.g. add an explicit cast.
These errors can be suppressed with “-Ec”.