I am trying to crate a parametric static array in a header file. Let me elaborate my requirement
Wanted to create below array in header file statically which can be resolved at compile time
static char test_array[][256] = {
"hello_1",
"hello_2",
"hello_3" };
I need to generate this using macro which can do substitution with %d for 1,2 and 3 and the number of parameter also not fixed. What I mean here is tomorrow this array I can simply change through header file to
static char test_array[][256] = {
"hello_1",
"hello_45",
"hello_39",
"hello_101" };
I have the code to do it at run time in .c file but specifically I want to do it in a header file through macros .