Non-Portable pointer assignment?

Boyd Roberts boyd at prl.dec.com
Wed Jun 5 18:51:38 AEST 1991


In article <JXey32w164w at dat1hb.north.de>, lion at dat1hb.north.de (Daniel Tietze) writes:
> roy%cybrspc at cs.umn.edu (Roy M. Silvernail) writes:
> 
> >     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.

Eh?  'x' is a char, while "x" is a string.  He probably needs:

    extern char *strchr();

Somewhere before strchr() is used, but within the same scope.


Boyd Roberts			boyd at prl.dec.com

``When the going gets wierd, the weird turn pro...''



More information about the Comp.lang.c mailing list