Progress_display
Purpose
Progress_display can display the progress of the program execution on the console. If the program execution is time consuming, it can provide a friendly user interface.
It will not make users lose patience while waiting, or even doubt whether the program is running properly.
Usage example
# Include <boost/progress. HPP> # include <iostream> # include <vector> using namespace STD; using namespace boost; int main () {STD: vector <string> V (100 ); progress_display Pd (v. size (); // declare the progress bar parameter to be the total number of rows on the progress bar. In this example, 100for (Auto & X: V) {cout <X; ++ PD; // a total of 100 cycles per cycle: PD + 1 Pd/v. size () * 100% is the percentage of progress for (INT I = 0; I <6000; I ++) {for (Int J = 0; j <6000; j ++);} // The latency is clearer.} return 0 ;}
The parameter type is unsigned long.
The experiment result is: