B
BrianJones
I have a problem with the int strcmp(str1,str2) function:
When I do:
char *pass;
char *passv;
pass = getpass("Please enter.....");
passv = getpass("Please verify.....");
if(strcmp(pass,passv)==1) // i.e. failure{
cout<<"Verification failed!<<endl;
exit(1);
}
Problem: Does't seem to work properly, even though the strings, pass and
passv are exactly the same. for some reason, it doen't go in to the if
statement Any syggestions?
Cheers,
Ben
When I do:
char *pass;
char *passv;
pass = getpass("Please enter.....");
passv = getpass("Please verify.....");
if(strcmp(pass,passv)==1) // i.e. failure{
cout<<"Verification failed!<<endl;
exit(1);
}
Problem: Does't seem to work properly, even though the strings, pass and
passv are exactly the same. for some reason, it doen't go in to the if
statement Any syggestions?
Cheers,
Ben