Date: Thu, 6 Apr 2000 19:18:46 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Bart Verbakel cc: djgpp AT Delorie DOT com Subject: Re: getch() with DJGPP In-Reply-To: <38EC822B.230D4ECE@cafeetje.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 6 Apr 2000, Bart Verbakel wrote: > while ( getch() != 'q' ) > printf("Neverending textstring"); > > This is SUPPOSED to put the string to stdout, > until I touch the 'q' key. > > But, compiling this with DJGPP and running it in an DOS-box > under Win98, It does not!! > After each 'printf' it waits for me to press "RETURN" stdout is buffered. Put an fflush(stdout) after printf, and it will do what you want. See section 9.5 of the FAQ for more insight on this issue.