How can I get the contents of a file at build time into my C++ string?

后端 未结 5 1515
猫巷女王i
猫巷女王i 2021-01-14 00:05

I have a file I am compiling in C++ in which I wish to have a string whose value is the contents of a file at the time of compilation.

In other words, I\'d like to #

5条回答
  •  庸人自扰
    2021-01-14 00:53

    The only way I can think of is to have another file generated off your file as a pre-compile step. You can build a small utility which will do it for you. This utility can take care of double-quotes and you can call it before compilation in your build file

提交回复
热议问题