How to declare a function identifier

If I have some sample code like this:

void func_1 {
.......
func_2;
}
func_2{
.......
}

I need to declare a function id for the func_2code to work, how do I do it?

+3
source share
2 answers

If it func_2doesn't func_1, you can simply reorder:

void func_2()
{
}

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

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

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

void func2()
{
  // ...
  func1();
}
+8
source
void func_2 ();

void func_1 ()
{
 ...
}

void func_2 ()
{
 ...
}
+3
source

All Articles