我使用的是BF561,使用异步存储的端口来调LCD。在deal.txt记事本里放了512个数用于连点划线。
原来运行在uclinux下的程序中有下边这句:
char path[16] = "/mnt/deal.txt";
在裸机下,我把程序修改为:
char path[16] = "F:\\deal.txt" ;
编译的时候出错,显示cc0144: error: a value of type "char [39]" cannot be used to initialize an entity of type "char [16]"。
把path[16]改为39或更大的数,则编译、运行成功。
我不太明白,明明这个文件夹里放了512个数,为什么path这个数组只有39个元素?