More getch() woes
Marc WANDSCHNEIDER
storm at cs.mcgill.ca
Thu Mar 14 08:30:20 AEST 1991
The following program WITHOUT The line #include <conio.h> 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 <conio.h>> line in, it doesn't even
compile. I get LValue required in function main, and it point to the line
c = 0;
#include <stdio.h>
#include <conio.h>
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 at cs.mcgill.ca McGill University It's 11pm, do YOU
Marc Wandschneider Montreal, CANADA know what time it is?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Comp.lang.c
mailing list