I am working on a simple password manager in C++, and am wondering how I can keep my passwords updated after I close the program.
If I update the passwords in the program, they'll just revert to what's in the source code after I exit the program, I believe. Is there a way to make the changes persistent, after the program is closed?
Short of writing the password list over and over to an output file when I change passwords, is there another way to do this?
The answer depends on the system/platform you're writing for. Basically, you need some sort of persistent storage, it can be local file system or an external storage such as database. Writing to a file looks like a quick and simple solution, however you may want to take care of security. Therefore use some encryption library. If your list of passwords is big enough but you still want to use local storage, consider sqlite.