More getch() woes

Ted L. Glenn tlglenn at cs.arizona.edu
Thu Mar 14 11:39:11 AEST 1991


In article <1991Mar13.223020.18117 at cs.mcgill.ca>, storm at cs.mcgill.ca (Marc WANDSCHNEIDER) writes:
| 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;

       [Rest of program deleted]

    Um, c by itself isn't an int. You have c declared as an array of ints.
c[0] = c[1] =...= 0 would be legal.

-- 
        -Ted L. Glenn             "Don't worry, be happy!" <--Ack! Pffffhhht!
         tlglenn at cs.arizona.edu
         G19382105 at ccit.arizona.edu    G19382105 at ARIZRVAX.BITNET



More information about the Comp.lang.c mailing list