The only error I am getting is when the password entered is longer than 6 characters. I have tried a few things here and there but i cant seem to crack it. Any help would be greatly appreciated.
It worked for me. It truncates any over size which is a bit unusual but ...
Enter a password with at least 6 characters.
The password must contain a numerical digit, a lowercase letter,
and an uppercase letter.
1234AAdi
The password you entered: 1234AAd is valid!
The problem I can see with your code are lines 11 and 12. You are making the password that they can enter to be limited to 6 characters because there is only space in your character array for 7 elements including the terminator character. So you need to tweak the code a little bit to make the 2 arrays match in size otherwise there are more characters that can fit in the array.
Unless you have to avoid using the string container I would advise that you use the C++ string container for your code instead of raw character arrays and C methods. It makes things a lot easier for you and it also means you can have as many characters as you need without having to do any allocation yourself.
Sorry for the late response everyone, Ive been slammed with work and other classes. Thanks for your advice, it woke up the sleeping portion of my brain to find a solution. Thanks again!