What would be an easy way of implementing a console-based progress indicator for a task that\'s being executed, but I can\'t anticipate how much time it would take?
I us
Wow, clipper
, perhaps you are talking about the @row,col things built in to the language? (Rhetorical question only...)
You can do simple progress bars with printf: you can leave out the trailing newline. You can obviously begin or end the string with \b in order to overprint characters. It's easy to do the traditional -\|/ kind that way.
I recall that the Eclipse UI guidelines recommended progress indicators regardless of how much you were able to tell about the actual progress. I think theory was that anything is better than nothing and to just do the best you can.
The only trick that you are likely to need is potentially to defeat line buffering. Be sure to fflush(stdout)
after each output operation. (Or ostream::flush())