Hey I know i am over looking somthing small but can i get some help on line 23
(strcmp(chartryname, charname)==0 && (chartrypassword, charpassword) ==0){
I know this will not work its just to show what i am trying to do. I need to check two pairs of strings how should I write the and part of the if statment.
any help would be great thanks.
//login with loop
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h> // for gets
#include <string.h> // for string
int main()
{
char charname[10],charpassword[15],chartryname[10],chartrypassword[15];
cout<<"Please enter a user name to setup\n ";
gets(charname);
cout<<"Please enter a password to setup\n ";
gets(charpassword);
cout<<"Please enter your user name\n ";
gets (chartryname);
cout<<"Please enter your password\n ";
gets (chartrypassword);
if
(strcmp(chartryname, charname)==0 && (chartrypassword, charpassword) ==0){
cout<<"\t The details you entered are correct "<<endl;
}
else
{
cout<<"\t The details you entered are incorrect "<<endl;
}
//end of if statment
//end of loop
system("PAUSE");
return 0;
} //end main