goto 语句怎么用啊
举个具体的例子

#include <iostream.h> int main() { int counter=0; Loop: //所要 goto 的地方 cout<<"This loop runs for 10 times"<<endl; counter++; if(counter!=10) goto Loop;//goto 指定的地方 return 0; }
其实goto虽然方便,可是却是一个很乱的编程方法,好的程序里面是不应该有goto的。尽量用loop,,recursion,function call来解决问题。
[[it] 本帖最后由 freedomz 于 2008-4-23 23:37 编辑 [/it]]