在switch中定义变量的问题?
例:switch(ival){
case 1:
int i=0;
break;
case 2:
......;
}
1: 在case 1:中定义的i是不是可以在case 2:中运用
2: 如果把int i=0;break;加上{}是不是只能在case 1:中使用 而 case 2:就不能运用了?
2008-09-10 21:05
2008-09-10 21:13
2008-09-10 21:38

2008-09-10 22:11
2008-09-10 22:24