WhiteDevil-0-3 / wdevil

Looking for help to solve the code
0 stars 0 forks source link

the .txt file in file processing isn't fully read by the programme #1

Open WhiteDevil-0-3 opened 1 year ago

WhiteDevil-0-3 commented 1 year ago

` cout<<""<<endl; cout<<"\t\t\t\t\tLogin Page\n"; cout<<""<<endl;

ifstream read;
read.open("register.txt");

string usr,un,psw,ps;

cout<<"Username :";
cin>>usr;
cout<<"Password :";
cin>>psw;

getline(read,un);
getline(read,ps);

if(un == usr && ps == psw )
{
    cout<<"\n\nLogin successful..... \n\n"<<endl;
}
else
{
    cout<<"\n\nUsername or password wrong!!!!\n\n"<<endl;
    login();
}

read.close();
`

the register.txt file whitedevil 1234 darkangel 2345

WhiteDevil-0-3 commented 1 year ago

the darkangel and 2345 is cannot be detected by the read file