Quote:
Originally Posted by HM
You are reading new passwords all over the place.
...
You should only do one getline() per loop.
|
I understand what you're saying, but the program has to do this:
Quote:
Please enter a password: pass6
Passwords must be at least 6 characters long
Please enter a password: TarrantNW
Passwords must include at least one digit (1-9)
Please enter a password: Tccd03
Thank you that is a valid password
|
Quote:
Originally Posted by HM
What if the password you read in passLength() is good? You return false anyway and ask for a new one at the next step.
|
If the password I read in passLength is good (true for both conditions) then it is not false for containDigit. containDigit only runs on the condition of containDigit being false. If it is true, containDigit is not called, and the while condition of the loop exits to main function.