Writing a very basic function that checks a password is correct, no checks for username of anything. Program works I just cant get the return message "Access granted!" printed..?
Although, OP, keep in mind that that might not be the best approach to your problem. When creating functions that gives error feedback you should use bools or ints.
Consider the following:
That is a much more intuitive approach because you would be able to do other things with the results from check_pass. Perhaps you don't just want to output the results as a string, but you want to check the result to see if it's a pass and then activate some other procedure. If you return a string "Access granted!" from the check function, you would have to do this to check if the username/pass worked
Ok, Thanks Thumper I can see what you are saying. So change the function to a bool, change the return messages to either true or false and add a if statement in main? Ill try this now and let ya know how I go sounds pretty straight forward.