今天写串口通信的实验,出现了一堆的bug,发现都是粗心大意
Error[Pe020]: identifier “uchar” is undefined
Error[Pe020]: identifier “uint” is undefined
原因是没有定义,潜意识一直以为uint和uchar在C/C++是合法的。
解决办法:宏定义
加上两行代码就可以了。
#define uint unsigned int
#define uchar unsigned char
今天写串口通信的实验,出现了一堆的bug,发现都是粗心大意
Error[Pe020]: identifier “uchar” is undefined
Error[Pe020]: identifier “uint” is undefined
原因是没有定义,潜意识一直以为uint和uchar在C/C++是合法的。
解决办法:宏定义
加上两行代码就可以了。
#define uint unsigned int
#define uchar unsigned char