23.11.2010, 01:11
Quote:
This is why I hate strcmp, but it's useful at times.
strcmp returns a false value if it's matching I think, I can't remember exactly if it's this way or the other way. If you do what cessil said, it should work. |
-1 if string1 comes before string2
1 if string1 comes after string2
0 if the strings are the same (for the matched length).
That's why I recommended 0 != strcmp, instead of just removing the !