用ccs报错.this declaration has no storage class or type specifi

用ccs报错.this declaration has no storage class or type specifier.完全不理
我在写msp430程序的时候想要将一个数组转换成字符串用串口发出去,但老是报警.
子函数如下TimerA_UART_print()
{
x05char *string;
x05x05*string = tab[0];
TimerA_UART_tx(*string++);
}
Descriptionx05Resourcex05Pathx05Locationx05Type
#78-D this declaration has no storage class or type specifierx05main.cx05/test_foreverx05line 28x05C/C++ Problem
Descriptionx05Resourcex05Pathx05Locationx05Type
#551-D variable "string" is used before its value is setx05main.cx05/test_foreverx05line 182x05C/C++ Problem
为什么啊.急死了.小弟初学者还请高人指点啊.
我的璇宝贝 1年前 已收到1个回答 举报

ghssniewind 幼苗

共回答了24个问题采纳率:83.3% 举报

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

1年前

8
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.027 s. - webmaster@yulucn.com