首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

boost progress_display兑现进度条

2012-09-10 
boost progress_display实现进度条boost progress_display实现进度条#include vector#include boost/pr

boost progress_display实现进度条

boost progress_display实现进度条

#include <vector>#include <boost/progress.hpp>#include <fstream>using namespace std;using namespace boost;int main(){    vector<string> v(100);    for ( int i = 0; i < 10000000; ++i)    {           v.push_back("abcd\n");    }       progress_display pd(v.size());        ofstream fs("./test.txt", ios::out );    vector<string>::iterator pos;    for ( pos = v.begin(); pos != v.end(); ++pos)    {           fs << *pos <<endl;        ++pd;    }       return 0;}





热点排行