Sign in to follow this  
Asuralm

Percentage Indicator on command line c++

Recommended Posts

Asuralm    123
Hi all: If I have a loop, say, 100, 000 times. How can I write a percentage indicator appears on the terminal command line please? Something like: 15% And the cursor stays on where it is but the percentage increases. Any help? Thanks

Share this post


Link to post
Share on other sites
SiCrane    11839
C++ has no native notion of cursor position, so your choices are either use operating system specific functions and libraries or a portable library like pdcurses.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this