Question: Answer in C++ please Create a program to verify a user name and password given by a user Create a text file named correctData.txt (You
Answer in C++ please Create a program to verify a user name and password given by a user Create a text file named "correctData.txt" (You will NOT upload this file during submission). Place a username on line 1 in the txt file and a password on line 2 in the file. This will be used for testing. Create the following functions and call them starting from main: void Login 0-This function is responsible for displaying the prompts asking for user name and password. It will only allow a user to attempt a password 3 times for security measures before returning back to main. You will need to use a loop to accomplish this task. bool CheckCredentials (string username, string password)- In order to validate the username and password. This is a boolean return and will return true or false from this function if the data verified does not match the file. middotYou will need to use fstream to create an instance of a file using ifstream. Compare the strings to the data in the text file. Remember, the username will be on line 1 in the text file and the password will be on line 2. 1. Close the fstream file before returning 0 2. Prototype functions. 3. Don't use global variables When completedmiddot upload the cpp file only! Don't worry about uploading the txt file. Please use discussion board if you have any clarity questions about the assignment. Thanks and GLHF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
