Mail Archives: djgpp-workers/1999/04/22/04:33:01
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 -