Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!milton!unicorn!n8840371 From: n8840371@unicorn.cc.wwu.edu (Todd Crowe) Newsgroups: comp.lang.c Subject: Re: More getch() woes Message-ID: <1991Mar14.010307.19009@unicorn.cc.wwu.edu> Date: 14 Mar 91 01:03:07 GMT References: <1991Mar13.223020.18117@cs.mcgill.ca> Organization: Western Washington University, Bellingham WA. Lines: 37 Ok, I'll bite. I'm no C guru like some people are here, but I can answer this. storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: >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; ^ | This should give you a good clue as to what is going on. >#include >#include >main() >{ > int i, test, c[25]; > i = 0; > c = 0; > (rest of code deleted) >Any insight...? Yep. c is the name of an array. As such it is a constant value (i.e. it is not a valid lvalue). You are in effect trying to assign a value to a constant. I'm not quite sure what you are trying to do with but you need to either make it a scalar or an array but not both. +++++++++++++++ "Dont get your hair in an uproar!!!" +++++ +@+++++++++++++ +-----------------------------------------------------+ +++++ +++Western+++++ | Todd Crowe | +++++++Washington+++ | n8840371@unicorn.cc.wwu.edu | +++++++University+++ | TODDC@nessie.cc.wwu.edu | +++++++++++++++++++ +-----------------------------------------------------+ ++++++++++ "Innovate, don't litigate!"