Original Post
Hmmm...I don't know how to tab the code here.
I'm reading through "The C Programming Language" right now, and one of their examples for getting input does not seem to work like it's supposed to for me. Here's theire code:
#include
int main ()
{
...long nc;
...nc = 0;
...while (getchar () != EOF)
......++nc;
...printf ("%ld\n", nc);
...return 1;
}
This will never end, so I need to end the program through Windows. I don't see how I can get the keyboard to return EOF.
---
my website
Edited by - Densun on 11/17/00 9:56:15 PM
Edited by - Densun on 11/17/00 9:57:08 PM
Edited by - Densun on 11/17/00 9:57:52 PM