www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/22/04:33:01

Date: Thu, 22 Apr 1999 11:28:02 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT usa DOT net>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Bug no. 277
In-Reply-To: <199904201531.PAA78048@out2.ibm.net>
Message-ID: <Pine.SUN.3.91.990422112740.15748H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 20 Apr 1999, Mark E. wrote:

> > > But when I added clearerr(stdin) to bug 277's sample 
> > > program, it made no difference. So I have to conclude that it's a 
> > > libstdc++ and not a DJGPP problem .
> > 
> > So this probably means that libstdc++ doesn't use the stdin stream at all,
> > right?
> 
> It does use the stdio stream.

This seems to contradict your observation that "clearerr(stdin)" in
the C++ program doesn't solve the problem, whereas in a C program it
does.

> Also, I did get #277's program to work 
> after changing 'int q' to 'char q' along with the clearerr(stdin) call. 

That's because "char q" simply reads the ^Z character, I think.

- Raw text -


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