I have 30 functions like this
void func1(int *var1, int *var2)
{
func2(var1, var2);
}
void func2(int *var1, int *var2)
{
func3(var1, var2);
}
void func3(int *var1, int *var2)
{
func4(var1, var2);
}
I do not need var3 until func15. Is there a way to fix this mistake without having to change all the function calls and headings? var3 needs to be remembered every time I get to func15. I only use var3 in func15 though so I really do not want to have to change all of my function calls and headings. It obviously can't be a local variable or it will be forgotten each time it is called.
void func15(int *var1, int *var2, int *var3)
{
func16(var1, var2);
}