3 ms·
Is there a way to append/extend a MACRO value ? For example, I have a arbitrary number of includes, each of them declare a struct that need to be listed later
by troukistan 7y ago
Is there a way to append/extend a MACRO value ?
For example, I have a arbitrary number of includes, each of them declare a struct that need to be listed later on.
#define MOD_LIST // start with an empty list
#include "mod/a.c"
// MOD_LIST is: a,
#include "mod/b.c"
// MOD_LIST is: a,b,
Module modules[] = {
MOD_LIST
}