This is the assignment I got: 3. Modify your password program from before to put all of the password checking logic into a
separate function, apart from the rest of the program.
Now when I execute the code what happens is it always gives me the Else statement even when I use the correct username and password but doesn't count the LoginAttempt. Now I suspect I messed up somehow with the function but I have no clue what I did wrong. So where did I mess up?
Now what I think is that the string username; and string password; in the checkp function are local variables so they never are correct right? How do I change it so the scope is available in int main() or is that not what has gone wrong?