Re: (C) missing semi-colon
From: Mike Wahler (mkwahler_at_mkwahler.net)
Date: 11/05/04
- Next message: Karl Heinz Buchegger: "Re: decrement past beginning is valid?"
- Previous message: Watson Davis: "Re: decrement past beginning is valid?"
- In reply to: Paul Fedorenko: "Re: (C) missing semi-colon"
- Next in thread: Arthur J. O'Dwyer: "Re: (C) missing semi-colon"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 05 Nov 2004 08:20:24 GMT
"Paul Fedorenko" <pfedorenko@look.ca> wrote in message
news:ESCid.24570$OD3.1266909@news20.bellglobal.com...
> One last... Thanks for all your help. And to Jack and Alwyn, too.
>
> You mentioned no less than three times that fflush() is undefined for
input
> streams, and that I "must extract the characters with an input function"
if
> I want to make sure nothing's left over in stdin from previous inputs.
> That's exactly what I'm trying to do, but know no other way of going about
> it. So if you have a more acceptable solution, I'd be more than happy to
> find out about it and start using it.
#include <stdio.h>
void discard(void)
{
int c = 0;
while((c = getchar()) != '\n' && c != EOF)
;
}
-Mike
- Next message: Karl Heinz Buchegger: "Re: decrement past beginning is valid?"
- Previous message: Watson Davis: "Re: decrement past beginning is valid?"
- In reply to: Paul Fedorenko: "Re: (C) missing semi-colon"
- Next in thread: Arthur J. O'Dwyer: "Re: (C) missing semi-colon"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]