Is there a preprocessing trick that allows me to “include” the file as a line in the header?
Something like that:
a.txt
lorem ipsum dolorem
sit amet
and "magic" include a call similar to this:
header.h
MAGICINCLUDE(a.txt, atxt)
As a result, the preprocessor does the tricks, and the above line is equivalent to this:
const char* atxt = "lorem ipsum dolorem\n\
sit amet";
No external tool should be used, just a preprocessor: I'm trying to get rid of my python scripts that do this.
source
share