Hi All,
I have 100 functions which have similar name but different in last few characters. for example, void get_fun1(void), void get_fun2(void), void get_fun3(void), ..........etc void get_fun100(void).


Now i want to call those functions with a single variable dynamically. I can say like, i will get some number from some other module. If i get the value as 3 from that other module, i should call that function as get_fun3().

So i need a generic "function calling" statement to invoke any one of the function out of hundred.

i came to know that there is a methodology like .....


Code:
#define get(x) get_##x()
void get_1()
{
printf("\nOne");
}
void get_2()
{
printf("\nTwo");
}
void main()
{
int i;
scanf("%d",&i);
get(1);
}

If i pass the static values (1,5,8...) to the get() function in the above code, it is working good. Suppose if i pass the value as a variables (i), it is not working.

Can any one suggest me how to solve this issue?

Thanks in advance,
Raghunadhs