How does one store sensitive data (ex: passwords) in std::string?
std::string
I have an application which prompts the user for a password and passes it to a downstr
std::string mystring; ... std::fill(mystring.begin(), mystring.end(), 0);
or even better write your own function:
void clear(std::string &v) { std::fill(v.begin(), v.end(), 0); }