Advertisement

statment not workin

Started by November 14, 2000 12:24 AM
0 comments, last by slightlywhacked 24 years, 2 months ago
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
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

This topic is closed to new replies.

Advertisement