Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!spool.mu.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!storm From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Newsgroups: comp.lang.c Subject: More getch() woes Summary: System freezing up Message-ID: <1991Mar13.223020.18117@cs.mcgill.ca> Date: 13 Mar 91 22:30:20 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 36 The following program WITHOUT The line #include does not work. It just freezes the entire system up, and I have to reboot (usin TC++ 1.0 on a PC). However, when I put the #include > line in, it doesn't even compile. I get LValue required in function main, and it point to the line c = 0; #include #include main() { int i, test, c[25]; i = 0; c = 0; while ((i < 25) || (test !='A')) { test = getch(); c[i++] = test; } printf("\n\n %s", c); return 0; } Any insight...? Thanks! ./*- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storm@cs.mcgill.ca McGill University It's 11pm, do YOU Marc Wandschneider Montreal, CANADA know what time it is? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~