If won't work in evaluating integers will it? That's my interpretation
of what I've been reading. You would have to use switch in those interger
cases. I had some code.
if (ans=='y') printf("ok"); exit(0); /* ans is a char */
But what I'm asking for here is the ascii value for y. An integer. So my
compiler complained. Now if I did this,
if (ans=="y") printf("ok"); exit(0);
Then it would work right? Otherwise,
switch (ans=='y')
case1: printf ("ok"); exit (0);
break;
case 2: if (ans!='y') printf("error"); exit(1);
break;
Have I proofreaded myself pretty good on this one? I don't really know
switch well though. I should go with the if (ans=="y") since a string is
what I want.
Bill