Indicators is a project that has code ready for you to implement when creating progress bars in the terminal.
Characteristics
Thread-safe progress bars and spinners
Header-only library. Take a copy to include.
Single header version in single_include.
The source of the GIF
MIT License
Creating a Basic Progress Bar
To implement a progress bar in your app, add indicators/progress_bar.hpp and create a ProgressBar object. This is the general structure of a progress bar:
The amount of progress in ProgressBar is kept as a size_t in the range [0, 100]. When the progress reaches 100, the progression is complete.
In application-level code, there are two ways to update this progress: Update progress using bar.tick()
Another examples
Indeterminate progress bar
Blocked progress bar
Spinners
Implemented in real life
If you have an iso of say 5GB and you want to copy it to another directory, the code would be;
Comments