#: 4668 S3/Languages
26-Jun-90 21:33:44
Sb: #4656-thanks to all
Fm: James Jones 76257,562
To: SCOTT HOWELL 70270,641 (X)
Be careful. Two things: (1) strcmp expects to be handed *pointers* to
characters, and those pointers had better point to NUL-terminated strings, so
that even if you changed that to strcmp("q", &ch), it might not do what you
want. (2) strcmp() is documented to return a negative number if the first
string is less than the second, zero if the first string is equal to the
second, and a positive number if the first string is greater than the second.
It always pays to read the documentation.
|