I have to create objects dynamically. So for that I have the following:
#define timerID(num) timerID_##num
This results in as timerID_num
instead of say timerID_1
.
Can someone let me know how to do this?
I have to create objects dynamically. So for that I have the following:
#define timerID(num) timerID_##num
This results in as timerID_num
instead of say timerID_1
.
Can someone let me know how to do this?
Check following code snippet:
#define f(g,g2) g##g2
void main()
{
int timerID_1 = 12;
printf("%d",f(timerID_,1));
}
This will concatenate to timerID_1
. I printed the value just for debug.