On Jul 18, 1:27 pm, Erik Wikström <Erik-wikst...@telia.comwrote:
Quote:
|
On 2007-07-18 13:13, pratap wrote:
|
Quote:
Quote:
I have an application which periodically gives me an output of sonar
values .However i am unable to view the values as they get replaced by
the new ones below in realtime and are displayed after the previous
output is displayed. Is there any mechanism in C++ where i can fix
position of the string on console e.g. "sonar 0 =" and the output
147.000 gets replaced by the new value as the new reading gets read.
This way the results would be more visible.
| |
Quote:
There's no way to do that with the standard IO capabilities of C++, you
have to use some third-party library, which depends on your platform.
|
If the values are all on one line, outputting enough '\b' and
then rewriting the entire line will usually work. (Not that I'd
really recommend it.) Otherwise, curses/ncurses is pretty much
the de facto standard.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34