I have a program that I'm making and I want to have the completion of one function lead to another function. So once one equation is done, I want for another equation in a different function to be completed. For example, in my program, I did this:
void Function1()
{
int a ;
a = 4 + 2 ; //For example
//now, go to another function, with the value of variable a
//how do I do that, so that the next function executed is Function2
// I did :
goto Function2() ;
}
void Function2()
{
int b ;
b = a - 4 ; // Again, just an example
}
Why doesn'y this work, and, what will?
when I compile it in Code::Blocks, the error message given is: