70,023
社区成员




#include <stdio.h>
int main(void)
{
if(1) {
continue;
printf("hello\n");
}
return 0;
}
cc main.c -o main
main.c: In function `main':
main.c:6: continue statement not within a loop
make: *** [main] Error 1
do{
if(!doSomething1())
break;
if(!doSomething2())
break;
if(!doSomething3())
break;
}while(0);
printf("error!");
if(condition)
{
//DoSomething; 如果满足某一条件,则做某事
}
else if
{
//..... 其他满足其他条件,则做某某事....
}
//..other 不满足,直接就跳出if了,不再判断,直接执行下面的语句了.这个根本不需要 continue或者break