switch引发的错误 a label can only be part of a statement and a declaration is not a statement
来源:互联网 发布:snmp监控linux主机 编辑:程序博客网 时间:2024/06/16 09:29
用switch的时候发现一个错误
a label can only be part of a statement and a declaration is not a statement
仔细观察以后发现是没有正确的加大括号引起的。
switch(a){ swtch(a){
case 1: case 1:
.................... {
.................... ...............
.................... ...............
break; ................
case 2: }
break; break;
} case 2:
break;
}
Error OK
追问
找到了原因,我在case下面定义了变量,并给它赋了初值,当把定义和赋值分开就好了,或者是加上大括号。
阅读全文
0 0
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- switch引发的错误:a label can only be part of a statement and a declaration is not a statement
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- 转:switch引发的错误:a label can only be part of a statement and a declaration is not a statement
- switch 错误:a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- a label can only be part of a statement and a declaration is not a statement
- 错误“a label can only be part of a statement and a declaration is not a statement”解决方法
- 错误“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
- ERROR:a label can only be part of a statement and a declaration is not a statement
- 【C/C++】error: a label can only be part of a statement and a declaration is not a statement
- C语言:error: a label can only be part of a statement and a declaration is not a statement|
- oracle FM 格式化
- Thinkphp框架使用小技巧
- Dojo简单应用
- postman中 form-data、x-www-form-urlencoded、raw、binary的区别》》》原文链接
- 三分钟学会用SpringMVC搭建最小系统(超详细)
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- E. Karen and Supermarket(树形dp)
- C#中窗体的close,dispose,以及application.exit()的区别
- poj1091(容斥原理+质因子分解)跳蚤
- navicat快捷键大全。
- ACM_41
- 编程珠玑课后题答案3.4
- 同步异步 阻塞非阻塞
- HDU2561 第二小整数【序列处理】