Need help fixing this function
How can I fix this? I know that the problem is with the bool's but I've been having trouble with it.
The program is for password verification.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
bool validate (string userString1, bool& longEnough, bool& foundUpper, bool& foundLower, bool& foundDigit)
{
longEnough = false;
foundUpper = false;
foundLower = false;
foundDigit = false;
int strLen = userString1.length();
if (strLen > 7)
longEnough = true;
if (isupper)
foundUpper = true;
if (islower)
foundLower = true;
if (isdigit)
foundDigit = true;
}
|
Your problem is that you haven't looked up how the function you're using works.
if (isupper) // if what is upper? Bananas, the sky, your password perhaps?
if (islower) // same
if (isdigit) // same
http://www.cprogramming.com/fod/isupper.html
Last edited on
Topic archived. No new replies allowed.