How can I use goto function across different functions .For ex ,
main()
{
....
REACH:
......
}
void function()
{
You can't. Think of this. There is a function A which is recursively calling another function B which in turn is calling A. Now, suppose that you put a goto statement from A to B. The question now becomes which instance of A do you want to go to which is undefined. Also, if no previous instance of A is defined, you have a bigger problem of no initialized variables in the function that are present before the label.
#include "bits/stdc++.h"
int i=0;
A(){
run:
B();
}
B(){
if(i==10)
goto run;
i++;
A();
}