if(flag1) { goto L1; } if(flag2) { goto L2; } L1://代码 L2://代码 注意只能在函数内部goto,不能goto到其他函数体里面去 转载于:https://www.cnblogs.com/redhairboy/p/9016729.html