textProgressBar
Loading...
Searching...
No Matches
bar.cc
Go to the documentation of this file.
1// Example: demonstrates basic usage of TextProgressBar in a tight loop.
2
3// textProgressBar
4#include "textProgressBar.h"
5
6// c++
7#include <iostream>
8using namespace std;
9
10int main(int argc, char* argv[])
11{
12 int nevents = 100000000;
13
14 TextProgressBar bar(30, " index progress: ", 1, nevents);
15
16 for(int i=1; i<nevents; i++) {
17 bar.setProgress(i);
18 }
19
20 return EXIT_SUCCESS;
21}
Renders an ASCII progress bar to standard output.
void setProgress(int p)
Updates the progress bar based on the provided progress value.
int main(int argc, char *argv[])