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>
8
using namespace
std;
9
10
int
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
}
TextProgressBar
Renders an ASCII progress bar to standard output.
Definition
textProgressBar.h:33
TextProgressBar::setProgress
void setProgress(int p)
Updates the progress bar based on the provided progress value.
Definition
textProgressBar.cc:8
main
int main(int argc, char *argv[])
textProgressBar.h
examples
bar.cc
Generated by
1.10.0