搞定error: #268: declaration may not appear after executable statement
来源:互联网 发布:制作程序软件 编辑:程序博客网 时间:2024/05/29 06:43
使用MDK调试的时候,出现一下错误:
error: #268: declaration may not appear after executablestatement
查询后发现问题:
变量的声明,不能放在可执行语句的后面,必须在主函数开头声明变量!
在程序中申明一个变量时,会出现以上错误。
出现编译错误的函数如下:
void Scan(void)
{
GetStart();
u8 ii;
while(1)
{ }
}
改正后,编译OK的函数如下:
void Scan(void)
{
u8 ii;
GetStart();
while(1)
{ }
}
相互对比,可以很快发现问题的出处,改正后,重新编译,编译OK!
error: #268: declaration may not appear after executablestatement
查询后发现问题:
变量的声明,不能放在可执行语句的后面,必须在主函数开头声明变量!
在程序中申明一个变量时,会出现以上错误。
出现编译错误的函数如下:
void Scan(void)
{
GetStart();
u8 ii;
while(1)
{ }
}
改正后,编译OK的函数如下:
void Scan(void)
{
u8 ii;
GetStart();
while(1)
{ }
}
相互对比,可以很快发现问题的出处,改正后,重新编译,编译OK!
1 0
- 搞定error: #268: declaration may not appear after executable statement
- error: declaration may not appear after executable statement in block
- error: declaration may not appear after executable statement in block
- error: declaration may not appear after executable statement in block
- error: declaration may not appear after executable statement in block
- KeilMDK 编译报错:error: #268: declaration may not appear after executable statement in block
- stm32:error: #268: declaration may not appear after executable statement in block
- 【complier】error: #268: declaration may not appear after executable statement in block
- declaration may not appear after executable statement in block
- keil中变量声明问题及error: #268: declaration may not appear after executable statement in block
- #268: declaration may not appear after executable statement in block 另类错误原因
- 使用Keil-STM32,cmsis_os.c 出现 error: #268: declaration may not appear after executable....
- error: #268: declaration may not appear after executabl statement in block
- SQL Error:An aggregate may not appear in the set list of an UPDATE statement.
- 【XML码农】【Error】The XML declaration may only appear at the very beginning of the document.
- error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
- error: a label can only be part of a statement and a declaration is not a statement
- ERROR:a label can only be part of a statement and a declaration is not a statement
- hdoj 1898 Sempr == The Best Problem Solver?
- PHP实现文件的上传
- R语言的一些看法
- hdoj 1977 Consecutive sum II
- 锤子手机开发真机运行
- 搞定error: #268: declaration may not appear after executable statement
- OC语言——构造方法和分类的使用
- MyBatis,Spring整合简易教程
- Spring+hibernate(jpa)+freemarker之数据库连接加密
- haar-cascade training需要自己编译exe文件
- 6.1 Java8增强的包装类
- Android 5.x OTA Update官方文档(十、版本签名)
- 【Android开发】高级组件-选项卡
- 关于PIC单片机18系列超低功耗软件编程的关键点