1

I'm sorry if this is really simple to do but I didn't find any answers elsewhere so that's why I'm coming here for help.

I want to open a txt file and edit some things and then paste it to another txt file so that if I give the compiled exe to a friend he doesn't need that .txt file to use it because it's within the exe. This may sound confusing but I tried explaining it the best I could, is this possible to do?

Rakete1111
  • 47,013
  • 16
  • 123
  • 162
  • 1
    You can always `#include` it in your program and assign it to a variable holding the file, though I don't know how practical that is :P – Rakete1111 Dec 31 '16 at 00:00
  • well I basically want to edit a page source code so I tried passing it to a string in file and then I can edit it. If I try to simply do std::string s = "" – Denis Majer Dec 31 '16 at 00:11
  • accidentally pressed enter, cont: then I have a bunch of errors because of all the characters in it that need to be escaped, but then I would need to "unescape" them when I want to output that html back to a file – Denis Majer Dec 31 '16 at 00:12
  • I thinks it's pretty clear, I have a cpp file and a txt file, I want to compile the cpp to include the txt file so that I can use fstream operations on it without it actually needing exist. – Denis Majer Dec 31 '16 at 00:18

0 Answers0