Thread View: gnu.g++.help
4 messages
4 total messages
Started by Albert Golembiowski
Thu, 24 Aug 1995 18:23
How to just flush `cout'?
Author: Albert Golembiowski
Date: Thu, 24 Aug 1995 18:23
Date: Thu, 24 Aug 1995 18:23
20 lines
1320 bytes
1320 bytes
I'd like the text " this an info line " appear on same line within
a loop, i.e. without feed-forward, so I try
---------------------- snip ---------------------------
for (int fld = 0; fld < out_img.Size(2); fld++) {
cout << '\r';
cout << " this an info line " << fld;
}
----------------------- snip ----------------------------
However, the test doesn't appear, since I believe `cout' needs to be
flushed. How to do it? "info" is mum about it. Unfortulately,
`endl' is of no use to me, as it flushes and feeds forward.
Your expertise will be much appreciated.
--
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Albert Golembiowski albert@inrs-telecom.uquebec.ca (514) 762-8655
INRS Telecommunications, 16 Place du Commerce, Verdun, Quebec, Canada, H3E 1H6
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Re: How to just flush `cout'?
Author: Donald Hunter
Date: Fri, 25 Aug 1995 08:49
Date: Fri, 25 Aug 1995 08:49
23 lines
1183 bytes
1183 bytes
In article <9508241818.AA01765@vital> albert@inrs-telecom.uquebec.ca (Albert Golembiowski) writes: > ... > > However, the test doesn't appear, since I believe `cout' needs to be > flushed. How to do it? "info" is mum about it. Unfortulately, > `endl' is of no use to me, as it flushes and feeds forward. > > Your expertise will be much appreciated. You can use: cout.flush(); Donald. -- | Donald I Hunter | Email: donaldh@memex.co.uk | | MR-Memex Ltd. | Phone: +44(0)13552 33804 ext 143 | | 2 Redwood Court, Peel Park, | | | East Kilbride, G74 5PF | Firkin Ale, it's firkin' great ! |
Re: How to just flush `cout'?
Author: Nick Bennett
Date: Fri, 25 Aug 1995 11:06
Date: Fri, 25 Aug 1995 11:06
4 lines
666 bytes
666 bytes
albert@inrs-telecom.uquebec.ca (Albert Golembiowski) wrote:
Try
cout << " this is an info line " << fld << flush;
Re: How to just flush `cout'?
Author: Matthias Koester
Date: Fri, 25 Aug 1995 12:19
Date: Fri, 25 Aug 1995 12:19
9 lines
641 bytes
641 bytes
Just try this: cout << flush; Matthias -- Adresse : Matthias Koester, Otto-Suhr-Str. 22, 26131 Oldenburg Tel. : 0441 / 592426 eMail : Matthias.Koester@Informatik.Uni-Oldenburg.DE
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads