The stub of AccountManager::changePassword() should look like this:
void AccountManager::changePassword(const string& userName, const string& newPassword) {
}
This method should behave as follows:
- Use myAccounts.find() to get an iterator it pointing to the pair containing userName
and its password.
- If it is different from myAccounts.end():
- Set it->second to newPassword.
- Otherwise: