[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: oh no! more problems



On Sun, Jun 13, 1999 at 06:32:16PM +0200, Felix Kollmann wrote:
> 	if (&zeichen== ".") {printf ("___.___\n");}
> and also:
> 	if (zeichen== (char) ".") {printf ("___.___\n");}
C doesn't work like that (at least not with strings).

Try the strcmp function. It returns true when strings are different, and
false when they are the same.

if (strcmp(str, "Rob")) printf ("Your name is not Rob\n");
else printf("You are one cool dude!\n");

Grtz, Rob
-- 
Rob Kaper | mail: cap@capsi.com + cap@capsi.net + cap@capsi.cx
          | web: http://capsi.com/ + http://capsi.cx/ - icq: 707085
          | "Got up early (as in before noon). A most confusing experience
          |  when the sun is coming up not going down." -- Alan Cox