Re: Word counting by Kernighan won't compile =(

2005-03-01 Thread Luyt
On Tuesday 01 March 2005 06:23, Mark Jayson Alvarez wrote: Sorry for asking this question here. I just thought that this might be a platform specific issue=). I'm reading this book(The C Programming Language 2nd Edition by Brian W. Kernighan. Upon reading the book, I came up with this

Word counting by Kernighan won't compile =(

2005-02-28 Thread Mark Jayson Alvarez
Hi, Sorry for asking this question here. I just thought that this might be a platform specific issue=). I'm reading this book(The C Programming Language 2nd Edition by Brian W. Kernighan. Upon reading the book, I came up with this example code. It says, it will count the number of words, lines

Re: Word counting by Kernighan won't compile =(

2005-02-28 Thread Mark Jayson Alvarez
--- Mark Jayson Alvarez [EMAIL PROTECTED] wrote: Hi, everyone! No need to answer this one. I think I know what my problem is. The book contains typographical errors such that example programs might not work if one would just copy and paste it. Particularly in the example below, the second if's

Re: Word counting by Kernighan won't compile =(

2005-02-28 Thread Kris Kennaway
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