Xref: utzoo comp.lang.c:13210 comp.std.c:421 comp.lang.scheme.c:23 comp.unix.questions:9651 Path: utzoo!attcan!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!oddjob!mimsy!dftsrv!ames!elroy!jpl-devvax!jato!mahendo!wlbr!hacgate!gryphon!cadovax!trwrb!trwspp!spp2!ries%jupiter From: ries@jupiter (Marc Ries) Newsgroups: comp.lang.c,comp.std.c,comp.lang.scheme.c,comp.unix.questions Subject: Re: ????? HELP!!! what is wring with this code? ??????? Message-ID: <1461@spp2.UUCP> Date: 7 Oct 88 14:36:21 GMT References: <456@mrsvr.UUCP> Sender: news@spp2.UUCP Reply-To: ries@spp2.UUCP (Marc Ries) Organization: TRW SEDD Lines: 26 In article <456@mrsvr.UUCP> ssa@mrsvr.UUCP (6607) writes: > > For the life of me I can't figure out what is wrong with the following > code!!!! It is supposed to parse words from a string in which words [...] >"test.c", line 7: warning: illegal combination of pointer and integer, op = > IT RUNS FINE !!!!!!!! >#include char *strtok(); >#define NULL (char *) 0 >main() >{ > char buf[81]; > char *tokptr,*strptr=buf; > gets (buf); > while((tokptr=strtok(strptr," \t")) != NULL ){ [...] Even though it works, lint and the compiler will be happy if you tell it that you know that strtok() is going to return a character pointer ("char *strtok();"), not an int. Marc Ries TRW Defense Systems Group/HMI UUCP: {sdcrdcf,decvax,ucbvax}!trwrb!spp2!ries@trwspp.UUCP Arpanet: ries@trwrb.TRW.COM