Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!nstar!towers!mgcind!opocus!FredMail From: Jon.Eric.Strayer@p3.f270.n231.z1.Fidonet.Org (Jon Eric Strayer) Newsgroups: comp.lang.c Subject: More getch() woes Message-ID: <669422030.1@opocus.Fidonet.Org> Date: 18 Mar 91 15:07:27 GMT Sender: FredMail@p0.f270.n231.z1.Fidonet.Org Lines: 30 Marc WANDSCHNEIDER writes to All: 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...? -------------------------------- I get the same result (Lvalue required) with or without includeing conio.h. I'm using TC++ 1.01, so that may be the reasong for differing results. But I don't see how you can be getting the above to compile in any case. If you want to assign zero to each element of an array you have to do just that. * Origin: Point No Point (Lebanon, IN) (1:231/270.3)