搜索
编程论坛
→
开发语言
→
C++论坛
→
『 C++教室 』
→ goto语句的使用
标题:
goto语句的使用
取消只看楼主
xunxunmimi
等 级:
新手上路
帖 子:70
专家分:0
注 册:2006-12-12
结帖率:
100%
楼主
问题点数:0 回复次数:0
goto语句的使用
使用goto语句时,如果关键字"goto"与标号之间出现变量的定义时,就会有错误,不知为什么。
例如:
...
goto aa;
int n=5;
n+=6;
aa:
...
但如果这样就不会有错误:
...
goto aa;
{
int n=5;
n+=6;
}
aa:
...
或者这样:
...
int n;
goto aa;
n=5;
n+=6;
aa:
...
也不会有错误。
搜索更多相关主题的帖子:
goto
语句
2008-09-03 21:08
1
1/1页
1
参与讨论请移步原网站贴子:
https://bbs.bccn.net/thread-231269-1-1.html
关于我们
|
广告合作
|
编程中国
|
清除Cookies
|
TOP
|
手机版
编程中国
版权所有,并保留所有权利。
Powered by
Discuz
, Processed in 0.015582 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved