statment not workin
infile.get (tempd,50);
infile.ignore(80, ''\n'');
if (strcmp(tempd, "Nigel") != THE_SAME)
{
strcpy(sp1truck1, tempd);
infile.get(sp1truck1url, 50);
infile.ignore(80, ''\n'');
infile.get(tempd, 50);
infile.ignore(80, ''\n'');
}
dosnt do the statement..even if the conditions are met
tempd is equal to Lude at this point and NOT_SAME is a constant that equals 1... the strcmp should return 0 cuz its not a true statment.. and since 0 dosnt equal 1.. everything should work right??
BAHcows go moomoos go cow
November 14, 2000 06:12 AM
The strcmp function does not return a boolean value.
Look it up in your helpfile. It returns zero if the
two strings are equal, non-zero otherwise.
hth
-nv
Look it up in your helpfile. It returns zero if the
two strings are equal, non-zero otherwise.
hth
-nv
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement