标签:
goto语句的使用:
#include <iostream>
using namespace std;
int main()
{
int i = 1;
number:
i++;
std::cout<<"*";
if(i<10)
{
goto number;
}
std::cout<<"\n 程序结束"<<endl;
return 0;
}
输出:
*********
程序结束
一般不用goto语句,调试困难!因为编译器难以报错!
标签:
原文地址:http://www.cnblogs.com/simonLiang/p/5897931.html