Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #12020
| From | Victor Bazarov <v.bazarov@comcast.invalid> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: what's the meaning of "stream"? |
| Date | 2011-12-02 11:13 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jbatfd$li0$2@dont-email.me> (permalink) |
| References | <ea757357-0bb5-4da6-bcd7-ae82241c95a6@h3g2000yqa.googlegroups.com> |
On 12/2/2011 9:25 AM, bo ye wrote:
> For example it's really puzzled me when I wrote:
>
> cout<<"Hi"<<flush;
>
> and
>
> cout<<"Hi"<<endl;
>
> The<C++ Primer> says : the "flush " flushes the buffer , adds no
> data and the "endl" inserts a newline , the flushes the buffer.
>
> I can not understand . Please tell me how the C++ stream implements.
I think that the expression
cout<<"Hi"<<endl
is equivalent to
cout<<"Hi"<<'\n'<<flush
V
--
I do not respond to top-posted replies, please don't ask
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
what's the meaning of "stream"? bo ye <kaustainbobyay@gmail.com> - 2011-12-02 06:25 -0800 Re: what's the meaning of "stream"? Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-02 11:13 -0500 Re: what's the meaning of "stream"? Stuart Redmann <DerTopper@web.de> - 2011-12-02 09:22 -0800 Re: what's the meaning of "stream"? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-12-02 21:07 +0000
csiph-web