if (nowString->Length >= MIN)
{
minLength = true;
}
for (int i = 0; i < nowString->Length; i++)
password[i] = static_cast<char>(nowString[i]);
for (int i = 0; i < nowString->Length; i++)
{
if (isupper(*password)) //determines if character is uppercase
hasUpper = true;
if (islower(*password)) //determines if character is lowercase
hasLower = true;
if (isdigit(*password)) //determine if character is digits
hasNumbers = true;
}
}
I am trying to validate a password that a user enters. In .cpp , this is the headers that I put:
Can you post a complete example that reproduces the problem? That will make it much easier to help you.
Also, please use code formatting tags. You can edit your post and add [code] and [/code] around your code.
By the way, this isn't standard C++, this is C++\CLI, or Microsoft's version of managed C++. The mixing of char arrays with String objects you have implemented is quite odd, and probably error-prone.
No, "in" would be a keyword of sorts. It's just part of the foreach syntax of C++ CLI code, to allow you to iterate over every element in password_txt->Text