-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cristea Bogdan wrote:
>     I know that this is rather a simple question for a C++ programmer, but I 
> don't know a better place to ask, since this topic is more related to the 
> operating system than to the C++ language.
>     I want to display the simulation progress in CLI using something like
> this:
> 
>   for(int n=0;n<10;n++)
>    {
>      sleep(2);
>      cout << (n/9.0) << "%\n";
>    }
> 
>     How can I display this using the same line instead of jumping each
> time at a new line ? (besides "\r")
>     Is there a way to make the cursor disappear while
> displaying?


If you are getting \r to perform as expected you are doing better than
me keep getting a new line when I use it :-)

The only thought I would have is to change the terminal emulation or use
curses. I would suggest trying the programming list as you will get the
attention of people who write code for the OS.

- --
==============================================================================
I have always wished that my computer would be as easy to use as my
telephone.
My wish has come true. I no longer know how to use my telephone.

Bjarne Stroustrup
==============================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGwqynasN0sSnLmgIRAoluAKCljyF2s1r2uCcczHxYtVfBxV//LQCdFjyU
z3iK4S/RnaY4fHm+86Htc0U=
=RiJp
-----END PGP SIGNATURE-----
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to