开发者

How to declare a function identifier

If i have a sample code like this:

开发者_如何学Pythonvoid func_1 {
.......
func_2;
}
func_2{
.......
}

I need to declare a function identifier for func_2 so that the code could run how do i do that?


If func_2 won't call func_1, then you can just reorder them:

void func_2()
{
}

void func_1()
{
  // ...
  func_2();
}

If they both call each other, then you can declare like so:

void func2();
void func1()
{
  // ...
  func2();
}

void func2()
{
  // ...
  func1();
}


void func_2 ();

void func_1 ()
{
 ...
}

void func_2 ()
{
 ...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜