Lets say I have the function
void do_work (foo?);
The ? represents a 0 or a 1 which will be the value of variable
int bar = 0;
There are also the variables
int foo0 = 0;
int foo1 = 0;
I am trying to inject the value of one variable into the name of another variable so that the function gets the full name of either variable depending on preceding logic.
How can I do this?
(In this situation, i'm not worried about good or bad practice.)