this declaration has no storage class or type specifier。。。警告什么意思

来源:互联网 发布:ec软件是什么 编辑:程序博客网 时间:2024/04/28 12:41
写msp430程序的时候想要将一个数组转换成字符串用串口发出去,但老是报警。。子函数如下TimerA_UART_print(){char *string;*string = tab[0]; TimerA_UART_tx(*string++);}Description Resource Path Location Type#78-D this declaration has no storage class or type specifier main.c /test_forever line 28 C/C++ ProblemDescription Resource Path Location Type#551-D variable "string" is used before its value is set main.c /test_forever line 182 C/C++ Problem为什么啊。。。。急死了。。。小弟初学者还请高人指点啊。。。。

满意回答

检举|2013-07-06 9:33

在函数TimerA_UART_print内,定义指针string 没有分配空间,就直接进行加法操作。属于不安全的内存操作。

原创粉丝点击