Question: Create a program to verify a user name and password given by a user. Create a text file names correctData.txt . ( You will

Create a program to verify a user name and password given by a user. Create a text file names "correctData.txt".(You will NOt upload this file during submission). Place a username on line 1 in the text 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()- this function is responsible for displayung the prompts asking for jser name snd password. It will only allow a user to attenlt a password 3 tines for security measures before returning back to makn. You will need to use a loop to accomplish this task. Book checkCredentials (string username, string password)- in order to validate the usernamen and password. This is a boolean and will return true or false from ghis function if the data verified does not match the file. You will need to use fstream to create an instance of a file using ifstream. Conoare the strings to the data in the text. Remember, the username will be on line 1 in the text file and the password will be on line 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!