delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/06/21:36:10

From: Chih Hui <wenzh AT singmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Flushing input stream?
Date: Tue, 06 Jul 1999 14:17:29 +0800
Organization: Subscriber of Pacific Internet
Message-ID: <37819F79.72629349@singmail.com>
NNTP-Posting-Host: ppp223.dyn86.pacific.net.sg
Mime-Version: 1.0
X-Mailer: Mozilla 4.03 [en] (Win95; I)
Lines: 15
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi, how do I flush the standard input stream in DJGPP? In other
compilers, I could use the non-standard way by using fflush(stdin).
Thanks.

main(){
  char ch1, ch2;

  printf("Enter a letter: ");
  ch1 = getchar();

  /* flush input here */

  printf("Enter another letter: ");
  ch2 = getchar();
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019