I was writing code, and I realized that I needed to call a function that internally called another function, but this function internally called the previous function. I know that the best way to do that is to predefine these functions in a structure or class that is defined before those functions, but I would like to know if there is another way to declare the function definition without creating any kind of structure?
Here is an example of the problem:
void Stop() {
}
void Reset() {
Stop();
Start();
}
void Start() {
//Set internally the function Reset to be called when the action ends
}
I know that it is a basic example, and it could be done using recursion, but in the complete example it is needed to be done in that way because internally it sets that function as an ending call of external functionality.