#include <stdio.h>
void Check (short);
int main()
{
short a;`
//[... code ...]
List :
//[... code ...]
Check (a);
//[... code ...]
}
void Check (short a);
{
if (a == 1)
{
goto List;
}
}
如何实现这样的用法?
前主
我想进入列表
- 函数跳转到main
是的
- 我是初学者
- 请回答我
最佳答案
这在 C 语言中是不可能的。
C 标准说,
The identifier in a goto statement shall name a label located somewhere in the enclosing function. A goto statement shall not jump from outside the scope of an identifier having a variably modified type to inside the scope of that identifier.
关于c - 如何在 main() 外部的不同函数中使用 goto 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42447494/