goto是一个跳转语句
int main(){
if(true)
goto next;
int j=0;
printf("exit 1\n");
return1;
next:
printf("exit 0\n");
return0;
}
1. window平台下vs编译可以通过,没有问题
2. mac下xcode编译过不了
error: cannot jump from this goto statement to its label goto next;
发现变量的声明必须放在goto前面, 去掉int j=0;就可以了