Hi all,
I'm currently doing a project where I'm making a programme where you can create an account and login to the program. The user name and passwords will be saved on another file called "Personal.txt"
This is how the "Personal.txt" will look like.
insert
Code:
infile >> name >> user >> password;
e.g. John Johny John123
The thing is I cant seem to do the logging in part. If I have alot of users the program seems to only read the first line of user name and password. How do I make the program scan the entire "Personal.txt" to allow it to login?
This is my current part of the login.
insert
Code:
{
cout << "Please login. Enter name<space>password: ";
cin >> user1 >> password1;
if (user1 == user && password1 == password)
{
cout << "WELCOME";
}
else
{
cout<<"Failed";
}
}
Also, How do I use toupper? I want to Toupper a "Y n N" and the username section of the program but from what I've seen online I do not understand what they mean.