zoukankan      html  css  js  c++  java
  • boost::progress_display

    progress_display 可以在控制台上显示程序的执行进度,见图1-1

    图1-1

     example

     1 
     2 /**
     3  * Build Success By VC++ 2010
     4  *
     5  * boost::progress_display
     6  *
     7  * copyright (C) 2010, lee
     8  */
     9 
    10 #include <iostream>
    11 #include <string>
    12 #include <vector>
    13 #include <boost/progress.hpp>
    14 
    15 using namespace std;
    16 
    17 int main()
    18 {
    19     vector<string> v(100);
    20 
    21     boost::progress_display pd(v.size());
    22 
    23     vector<string>::iterator pos;
    24     for (pos = v.begin(); pos != v.end(); ++pos)
    25     {
    26         ++pd; // 重载的 ++ 操作符,增加计数并输出当前进度。
    27     }
    28 
    29     return 0;
    30 }
    31 
  • 相关阅读:
    2013年 积木大赛
    Matlab 画图2
    Matlab 画图1
    Matlab 数值计算
    Matlab 条件循环函数
    Non Super Boring Substring 题解(hash+思维)
    Matlab 数组
    Matlab 矩阵
    L
    hdu 1671Phone List
  • 原文地址:https://www.cnblogs.com/bruceleeliya/p/1904436.html
Copyright © 2011-2022 走看看