I need to concatenate strings using macros to generate function names.
#define CONCAT(a,b,c) a ## b int i=1; CONCAT(a,i) This code gives ai as a result, while what I wanted is a1.
As there are many functions in my source code, I don't want to enumerate them.
My goal:
for(int i=0;i<100;i++) { Funi1();//here i should be from 0 to one hundred Funi2(); Funi3(); Funi4(); .. } @Potatoswatter
I have written a script to expand it and the output file cost serval hundred lines. @Eric Finn
iwith the value1. What are you actually trying to write?evalconvert string to command. However, in c language, I only find macro can work like that.