Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!ox.com!math.fu-berlin.de!uniol!sol.north.de!skuld!dat1hb!lion From: lion@dat1hb.north.de (Daniel Tietze) Newsgroups: comp.lang.c Subject: Re: Non-Portable pointer assignment? Message-ID: Date: 3 Jun 91 11:06:30 GMT References: Organization: DATELINE Communications, Bremen Lines: 21 roy%cybrspc@cs.umn.edu (Roy M. Silvernail) writes: > foo(char *p) { > char *q; > > q = strchr(p,'x'); /* this line gets complaints */ > } > Try q=strchr(p,"x"); , this should work. If I'm not mistaken, TC uses 'x' to denote a string and "x" to denote a char. At least, it always works this way when I get that error message (and, being something of a C novice, I get it rather more often than the average C programmer). Daniel +------------------------------------------------------------------+ | Daniel Tietze, 2800 Bremen 1, Tel.(voice) : 0421/448806 | |-=============- DATELINE Communications, Bremen. The home of DMS | | Mail: (private) lion@dat1hb.north.de (univ) E07J@DHBRRZ41.BITNET | |-====- DMS-Support: dateline@dat1hb.north.de | +------------------------------------------------------------------+