<分区>
如何在 C++ 中调用另一个函数内部的函数?
<分区>
如何在 C++ 中调用另一个函数内部的函数?
最佳答案
I don't think this is possible.
我不同意:
void bar()
{
}
void foo()
{
bar(); // there, I use bar inside foo
}
如果你想使用一个还没有被定义的函数,你必须先声明它,然后才能使用它:
void baz(); // function declaration
void foo()
{
baz();
}
void baz() // function definition
{
}
关于c++ - 如何在 C++ 中调用另一个函数内部的函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7139607/