switch引发的错误 a label can only be part of a statement and a declaration is not a statement
来源:互联网 发布:阿里云国际版怎么买 编辑:程序博客网 时间:2024/06/08 19:26
用switch的时候发现一个错误
a label can only be part of a statement and a declaration is not a statement
仔细观察以后发现是没有正确的加大括号引起的。
出错的代码如下
swtch (a)
case 'a':
... ...
... ...
break;
case 'b':
... ....
... ...
break;
default:
break;
然后编译的时候就会报错
改成如下格式就没有问题
swtch (a)
case 'a':
{
... ...
... ...
break;
}
case 'b':
... ....
... ...
break;
default:
break;
- 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|
- 解决找不到MSchart 控件Microsoft Chart Control, version 6.0
- sql跟踪
- Andorid安全模式
- MFC处理菜单栏和工具栏
- MIfare卡初接触
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- public,protected,private继承区别
- 编程者的忠告
- C/C++ 知识点汇集 【收藏】 其它连接
- MongoDB JAVA API插入和删除示例
- C语言学习经典书籍推荐
- 【非参数贝叶斯学习系列】Dirichlet distribution学习笔记
- 5月22日
- could not start the service mysql