C语言中do_while(0)使用
#include "main.h" static int check_param(void) { int ret = -1; do { if(1) { break; } ret = 0; }while(0); return ret; } int main() { printf("param is %d\n",check_param()); getchar(); return 0; }
一勤天下无难事。
#include "main.h" static int check_param(void) { int ret = -1; do { if(1) { break; } ret = 0; }while(0); return ret; } int main() { printf("param is %d\n",check_param()); getchar(); return 0; }