I presume you are working only on Windows (because you are using .exe files).
You can store data (such as a text file) in an executable as a
resource.
http://www.google.com/search?btnI=1&q=msdn+Finding+and+Loading+Resources
http://www.google.com/search?btnI=1&q=msdn+Resource+Functions
You also have to know how to create and compile resources into your .exe:
http://www.google.com/search?btnI=1&q=msdn+Resource+Compiler
There is a hitch, though: You cannot modify an .exe file that is currently executing.
Programs that do this (like updaters) do it by having
another small .exe whose sole purpose is to modify the main .exe. The main .exe will start the small .exe and terminate, at which point the small .exe will modify the main .exe, then restart the main .exe. This is a lot of grief.
A better bet is just to store your data in a file that the user is unlikely to find by accident -- put it in the user's local application data. Find this directory with the
ShGetKnownFolderPath() WinAPI function.
http://www.google.com/search?btnI=1&q=msdn+SHGetKnownFolderPath
Use the
FOLDERID_LocalAppData value as the first argument.
The pathname of files for your application should be named something like
LocalAppDataPath \ YourExe'sName \ data.conf
(And don't forget to
#include <shlobj.h>
and link with
shell32.dll.)
One
major suggestion for improvement: load the file into memory, modify the memory, and overwrite the file. It is simple enough to have structs with username/salt/password-hash data in a deque.
BTW, if you are serious about actual password data, there is a lot to learn. Here is some good reading to get started:
https://crackstation.net/hashing-security.htm
Good luck!