作者t007123 (林英杰後援会!!!)
看板C_and_CPP
标题[问题] if 和 label的问题
时间Fri Apr 24 11:31:02 2009
我可以成这样吗?
这样他都会当...
label1:
if(xxxxxxxxx)
{
xxxxxx
label2;
if(xxxxxxxxx)
{
xxxxxxx
goto label1;
}
else
{
xxxxxxxx
if(xxxxxx)
{
xxxxxx
goto label1;
}
else
{
xxxxx
goto label2;
}
好像是这里出现问题
}
}
请各位先进指导小弟一下
谢谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.117.238.47
1F:→ whenyouregon:非用goto不可吗?@@ 04/24 11:44
2F:→ adrianshum:重写吧..... 写什麽鬼 goto 04/24 11:58
3F:→ adrianshum:goto is not necessary evil, 但你这种肯定是 evil 04/24 11:58
4F:→ t007123:我只会用GOTO啊= = 请各位先进教我其他种方法 谢谢 04/24 12:06
5F:→ t007123:我没写过几次程式... 04/24 12:06
6F:推 littleshan:先看书 学一下 for/while 的用法吧 04/24 12:09
7F:嘘 locallocal:GOTO 是教授才能用的 04/24 12:42
8F:→ yan04870449:楼上不要激动阿~"~ 会问是好事阿!>< 多看点书OK的 04/24 12:56
9F:推 mryf:是label2後面应该":"的问题吗? 04/24 18:57
10F:推 cobrasgo:也真的不用看到goto就鞭呗 04/25 01:24