Word counting by Kernighan won't compile =(

Kris Kennaway kris at obsecurity.org
Tue Mar 1 05:55:08 GMT 2005


On Mon, Feb 28, 2005 at 09:23:22PM -0800, Mark Jayson Alvarez wrote:

> command line, until I send an EOF signal. I copied it
> verbatim and tried compiling it with plain "cc
> myprog.c" 
> 
> It exited with errors:
> 
> word.c: In function `main':
> word.c:17: error: invalid lvalue in assignment
> 
> Any idea what this means?

YOu didn't copy it verbatim ;-)

>   if (c == ' ' || c == '\n' || c = '\t')
                                   ^^

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050228/a75dc2ea/attachment.bin


More information about the freebsd-questions mailing list