Is there a preprocessor trick that allows me to "include" a file as a string in a header?
Something like this:
a.txt
lorem ipsum dolorem
sit amet
and the "magic" include call similar to this:
header.h
MAGICINCLUDE(a.txt, atxt)
As a result, the preprocessor does tricks and the above line is equivalent to this:
const char* atxt = "lorem ipsum dolorem\n\
sit amet";
No external tool shall be used, just the preprocessor: I am trying to get rid of my python scripts that do this.
No, there isn't.
You will need external tools:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With