Im trying to do a username and password login panel in my program and when i input the userid and password it shows the else output.In this case there are two different id and password which is when ID is "danisl"the password is "adapt2" while when the id is "arifrl" the password is "adapt1". the codes are
char userid[10],password[10];
while(y==1)
{
cout<<"username:";
cin.get(userid,9);
cout<<"password:";
cin.get(password,9);
if(userid=="arifrl")
{
if(password=="adapt1")
{
y=0;
}
else
{
cout<<"incorrect password";
}
}
else if(userid=="danisl")
{
if(password=="adapt2")
{
y=0;
}
else
{
cout<<"incorrect password";
}
}
else
{
cout<<"incorrect ID";
}
}