hey everyone, ive been trying for a while now to make this program and havent made much luck with it so i thought id ask some more experienced people.
i need to make a program that asks the user to enter a password. the password much contain at least 1 uppercase letter and 1 lowercase letter, and should have at least one digit.
ive been trying to use isupper in a loop that would check each character in a string but haven't been able to make it work. any help or advice would really be appreciated.
~jel
Yes For Upper case checking U can use isupper().
From Ur statement I think U r in the right track.
But U haven't specified what kind of error U r facing??
If U can elaborate the problem along with ur piece of code then it will be helpful for others to sort out.
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.
For 'validation' functions look here:
http://www.cplusplus.com/reference/clibrary/cctype/