C++ boost progress_display 的使用

#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <iostream>
#include <boost/progress.hpp>
using namespace boost;
using namespace std;
void main()
{


vector<string> vcLines;
for (int i = 0; i < 100; ++i)
{
vcLines.push_back("我是混蛋,我怕谁1");
}
ofstream fs("E:\\line.txt");

progress_display pdShow(vcLines.size());
vector<string>::iterator vcTem;

for (vcTem = vcLines.begin(); vcTem != vcLines.end(); ++vcTem)
{
fs << *vcTem << endl;
++pdShow;
}

vector<string> vcOutput;
string line;
ifstream ifile("E:\\line.txt");
while(ifile >> line)
{
cout << line << endl;
}


int wait;
cin >> wait;
}

posted @ 2013-07-01 21:06  Predator  阅读(387)  评论(0编辑  收藏  举报