| delorie.com/archives/browse.cgi | search |
| From: | jpace <jpace AT concentric DOT net> |
| Newsgroups: | comp.lang.c++,comp.os.msdos.djgpp |
| Subject: | Re: EOF |
| Date: | Sun, 26 Jan 1997 12:49:23 -0500 |
| Organization: | Concentric Internet Services |
| Lines: | 17 |
| Message-ID: | <32EB9923.2B8A@concentric.net> |
| References: | <32E6383C DOT 750D AT cu DOT lu> <5cf4em$dca AT isis DOT fiu DOT edu> |
| Reply-To: | jpace AT concentric DOT net |
| NNTP-Posting-Host: | cnc053075.concentric.net |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
daniel k rathjens wrote:
[ original problem snipped ]
>
> Which brings us to my question. Is there a better way to empty the
> stream than: while(cin.get(ch) { }?
> --
Try cin.ignore(MAX,delimeter). This will ignore everything up
to and including the delimeter, but will ignore only a maximum of MAX
characters.
> #include <disclaimer.h> #include <humorous_quote.h>
> void main(geek *code) { // pointer points to: Danny Rathjens
> GCS/M/S d+(-) s+:- a-- C+++>$ ULSC++>+++$ P+? L++ E W++(+) N+++ o K w++
> !O !M- V- PS PE+ Y-- PGP- t++@ !5 X+ R+ tv b+++ DI+ D+ G++ e+ h r y? }
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |