[sclug] Off topic C question

Patrick patrick at kirks.net
Fri Sep 22 10:29:06 UTC 2006


K&R says that a char is just a small int so chars can be used freely in 
expressions.  But doing a cast is more logical - thanks.

Dickon Hood wrote:
> On Fri, Sep 22, 2006 at 11:11:32 +0100, Patrick wrote:

> :         {
> :                 if (c == "l") {
> 
>                            ^^^ that's a char *, not a char.  You want
> 			   single quotes and a cast.
> 


More information about the Sclug mailing list