Here's the thing:
Let's say I have two function defined in C:
test_1() {};
test_2() {};
I would like to have a macro (e.g. NUM_TEST) that will refer to test number. Best way is to show it in code:
#define NUM_TEST 1
test_1() {};
test_2() {};
int main() {
test_ ## NUM_TEST ## ()
}
I would appreciate, if someone would help, to find a solution, how to concat name of function with macro.
EDIT:
To make it more clear. I would like to just by changing of "macro NUM_TEST" change invoked function between test_1() and test_2().
Yes I know there are more easier ways to do that, but this is just an example to more general problem: How to concat macro with text in C without adding new lines or new macro functions.
EDIT 2:
Obviously I was now clear enough. Let's say I wrote a program. It has two (or more) run types. I have one macro called NUM_TEST. By setting mentioned macro to 1 or 2 a want to choose run type between test_1() or test_2()
Thank you!