Victor said:
Something like
std::cout << "\rLoading: " << Xvalue << '%';
The behaviour of your terminal when \r is printed to it is of course
OS-specific, but it usually works the way you want it.
Don't forget to print 'std::endl' when you're done to move to the next
line.
Victor
Yeah I think the best way to do this is with your final progress bar
dislpayed as, for example:
[0%...25%...50%...75%...100%]
And progressivly add a '.' or number to the end. Something like this:
//----------------------------
cout << "[";
for ( int x = 0; x <= 100; x++ )
{
if ( !( x % 20 ) ) // display every 20th number
cout << x << "%";
else if ( !( x % 5) ) // otherwise display a dot every 5 numbers
cout << ".";
}
cout << "]";
//----------------------------