symbian “error: jump to case label”
2010-01-20 15:22
471 查看
我在编译我的程序时候,在模拟器上编译没有问题。但转到phone release(GCCE) 环境时,编译失败,还有平时定义的TBuf等常用描述符也是出错了,在网上找原因 就是因为switch case 的时候有问题,当case 是一条语句的时候可以
switch(xxxx)
{
case yyy:
zzz;
break;
case yyy:
zzz;
break;
default:
break;
}
但是当case的语句大于一条的时候我们就要注意了;这时候在真机编译的时候就是:
switch(xxxx)
{
case yyy:{
zzz;
aaa;
bbb
}
break;
case yyy:{
zzz;
aaa;
bbb;
}
break;
default:
break;
}
必须加上{}才可以
switch(xxxx)
{
case yyy:
zzz;
break;
case yyy:
zzz;
break;
default:
break;
}
但是当case的语句大于一条的时候我们就要注意了;这时候在真机编译的时候就是:
switch(xxxx)
{
case yyy:{
zzz;
aaa;
bbb
}
break;
case yyy:{
zzz;
aaa;
bbb;
}
break;
default:
break;
}
必须加上{}才可以
相关文章推荐
- qt编程中遇到的bug之error: jump to case label [-fpermissive]
- switch 语句:error : crosses initialization of 'xxx' and jump to case label [-fpermissive]
- error: jump to case label
- error: jump to case label,crosses initialization of "xxxxxx"
- error:jump to case label [-fpermissive]
- 【C/C++】error: jump to case label
- 【C/C++】error: jump to case label
- error: jump to case label [-fpermissive]
- C++ 解决"Error: Jump to case label"的问题
- error:jump to case label error:crosses initialization of
- error: jump to case label到说开初始化与作用域
- 【C++ 异常】error: jump to case label, crosses initialization
- error: jump to case label
- error: jump to case label
- error: jump to case label \n error: crosses initialization of xxx
- error:jump to case label
- error: jump to case label
- error:jump to case label [-fpermissive]
- error: jump to case label与crosses initialization of"xx"编译错误
- [转载]error:jump to case label