kanetaiの二次記憶装置

プログラミングに関するやってみた、調べた系のものをQitaに移して、それ以外をはてブでやる運用にしようと思います。http://qiita.com/kanetai

progress_display

Boost Timer Documentation - 1.46.0

deprecatedだと...知らんな.mylibに保存した

名前空間/ヘッダ

boost

#include <boost/progress.hpp>

コンストラクタ

使用例見りゃだいたいわかる

progress_display(unsigned long expected_count,
		std::ostream & os = std::cout,
		const std::string & s1 = "\n", //leading strings
		const std::string & s2 = "",
		const std::string & s3 = "" )

progress_display_TEST.cpp

#include <boost/progress.hpp>

int main()
{
	const int MAX = 10000000;

	boost::progress_display progress( MAX );
	for( int i=0; i<MAX; ++i, ++progress ) ;
	return 0;
}

結果

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
******************************