Question

I have 2 functions in my code, namely void compare(...) and void checklist(...).

In void compare(...), I have if statement that has been defined as Reselection.

Now, I need to use the goto function from void checklist(...) to go to Reselection in void compare(...).

Since I know that the goto function can only be used within that function, I was wondering if there are other function that works as goto function but can be used in different void functions?

Was it helpful?

Solution

No, labels are local to the function in which they are defined. And programs would be a real mess otherwise.

You should make Reselection a function of its own.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top