| delorie.com/archives/browse.cgi | search |
Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> writes:
> For the record, what's the "right" way to clear an input buffer?
Here's one "right" way, assuming that you mean "skip input up to
the end of the line":
for (;;) {
int c = getc (stream);
if (c == '\n' || c == EOF)
break;
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |