I have a text file that I would like to include in a stand alone executable. The file itself sits in source control in another directory and I think I want to have the text file added to the executable at compile time.
I’ve been reading a bit about resources but I’m not sure exactly what would be the best way to add the file. I also don’t know how I would reference and read from the file during execution.
The project is statically linked MFC, and I’m using vs2010. Any help would be much appreciated.
Simply add the file as a resource into your application. You can “read” it with code similar to this: