????? HELP!!! what is wring with this code? ???????

Doug Gwyn gwyn at smoke.ARPA
Fri Oct 7 19:36:12 AEST 1988


In article <456 at mrsvr.UUCP> ssa at mrsvr.UUCP (6607) writes:
>"test.c", line 7: warning: illegal combination of pointer and integer, op =
>#include <strings.h>
>	while((tokptr=strtok(strptr," \t")) != NULL ){

<strings.h> doesn't declare strtok, so it is assumed to return int
which is not compatible with the char * being assigned into.
<strings.h> was invented by Berkeley without regard for existing
practice.  <string.h> is the official standard header for the
str* functions, and it does declare strtok.



More information about the Comp.unix.questions mailing list