PLEASE HELP!! password

Hey everyone...I am very knew to C++ and I barley know anything. I have to make a lab due tomorrow where I have to develop a program to verify the complexity of a password.

i have to prompt the user to enter a password, read the password as a string and then test the password for the following conditions:

-password must be at least 6 characters long
-password must contain at least one upper case and one lower case letter
-password must contain at least one digit
-password must contain at least one punctuation character

I am just asking for some guidance on how to start this. I have a huge text book but it is not help.

If anyone could help me i would really appreciate it!!
closed account (z05DSL3A)
You could start here:
http://www.cplusplus.com/reference/clibrary/cctype/

You can have a number of flags (bool variables) one for each of the validation conditions. If you initialise them all too false; Check all the characters in your password against the validation criteria and if it passes set the corresponding flag to true. At the end all flags should be true or not the password has failed validation.
Last edited on
Topic archived. No new replies allowed.