18 ProgressBar(
int total) : tot_(total), curr_(0), what_(
"Loop")
20 ProgressBar(std::string what,
int total) : tot_(total), curr_(0), what_(what)
39 double prog =
static_cast<double>(curr_) / tot_;
40 int perc =
static_cast<int>(prog * 100.0);
41 std::cout <<
"\r" << std::setw(3) << perc <<
" %"
42 <<
" : " << what_ << std::flush;