I have 3 C++ files that I would like to generate using an executable file, I mean if I click on the executable my 3 files should appear beside it.
So I thought about using ofstream and then create my three files like this. But the problem is, my 3 files contain a lot of lines and escaping the " and ' will take a lot of time...
How can I embed C++ source code inside my executable without the hassle of escaping the string literals?
std::string a = "std::cout << "Hello"<<std::endl;"I would have notstd::cout << "Hello"<<std::endl;std::string a = "std::cout << "Hello"<<std::endl;"is not using raw string literals. Did you read the link?objcopyon Linux should do the trick. But there really isn't much you could do in a system-independent way apart from embedding the text in the source-file of your program.