TMSc5000编程时:Uint32 *ttt=(Uint32 *)0x00000000;(*ttt)=0x00000000;很简单的功能,在0x0地址写0x00000000,但是编译却出现了如下错误:declaration may not appear after executable statement in block我把Uint32 *ttt=(Uint32 *)0x00000000;从main函数中移到外边就可以了,完全正常,写数据也成功,咋回事呢?谁能回答下,谢谢各位。
你的*ttt是局部的还是全局的呢?
出错提示中说的很清楚“declaration may not appear after executable statement in block”可执行代码开始之后就不能再进行声明定义啦。估计你的 "Uint32 *ttt=(Uint32 *)0x00000000;" 这行代码不是在函数的最开头吧?
都是高手啊!
学习下拉了拉