错误:“a label can only be part of a statement and a declaration is not a statement”
对于goto语句,以下代码执行会报错。
int a;
circle:
int* posNode = &a;
goto circle;
原因是因为不能在标签circle:后直接声明变量。
circle:
printf(" ");
int* posNode = &a;
goto circle;
只需要使声明变量不紧跟标签circle:就可以运行了。