Article View: gnu.g++.help
Article #743How to just flush `cout'?
From: 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Technical Details
Message-ID:
<9508241818.AA01765@vital>Path:
arc1-ca.pugleaf.net!inrs-telecom.uquebec.ca!albertShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!inrs-telecom.uquebec.ca!albert From: albert@inrs-telecom.uquebec.ca (Albert Golembiowski) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: How to just flush `cout'? Date: 24 Aug 1995 14:23:12 -0400 Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu Sender: daemon@cis.ohio-state.edu Distribution: world Message-ID: <9508241818.AA01765@vital>