Message-Id: <1.5.4.32.19961009060235.006b6910@ans.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 09 Oct 1996 16:02:35 +1000 To: djgpp AT delorie DOT com From: Nicholas FitzRoy-Dale Subject: Trouble with getche() >I'm trying to do this simple little C thing, but it won't work right...I >copied it right out of a C book. >After I compile it, I run it and the cursor just goes to next line >(which is blank) and does nothing. Then, for example, I type p it says: > >pType a character: >You typed: p Many C compilers "buffer" their output, which means they don't send it anywhere until a certain amount of data has been recieved, or until a newline (\n) has been sent. I think DJGPP is line-buffered, ie, will not output until a newline is sent. In that case, the command fflush(stdio) will flush the buffer for you. Put the command after the first printf(). -/\/icholas wzdd AT mailhost DOT net (for regular email) nicholas AT ans DOT com DOT au (for files & lists)