Hello, I need to write a password check function to validate the following:
- Length of the string is at least 5 characters.
- Cannot be all digits.
- Cannot contain a space.
Below is some of what I have so far but I'm not sure if it is correct. Any suggestions is greatly appreciated.
void CheckPassword(cin, s)
{
password = CheckPassword();
do
{
cout << "password: ";
getline(cin, s);
}
if (length < 5 )
{
cout << "password: ";