Suppose I have a some C code, say, printf("A");
how can I repeat it N number of times based on some compile time argument where N is passed in that compiler argument. e.g gcc -D print=N
Similarly, is there a way where we can pass the range of the loop based on the compile time argument/flag?
for (int i = 0; i < print; ++i) ...
The first could be done in C++ with templates, not sure about C though. – john Jul 3 '20 at 19:26