I would like to do the following in C++:
static const char* data[] = { #include "mydata.hh" };
where the contents of mydata.hh are supposed to be assign as a char array to data.
I tried already various variants and (one and two level) stringification, via #x, of the #include . None worked so far. Is this actually possible or did I miss something?
Thanks ahead.
You can:
But why?
This is all assuming
mydata.hhcontains something compatible with the declaration: