现在的位置: 首页 > 综合 > 正文

linux 输出信息

2013年10月01日 ⁄ 综合 ⁄ 共 158字 ⁄ 字号 评论关闭


    bool bPhaseEnd = false;
    for (int i = 0; i <= 10; ++i) {
        if ( i == 10 ) { 
            bPhaseEnd = true;
        }   
        fprintf ( stdout, "%s%d%c","procesing ", i, bPhaseEnd ? '\n' : '\r' );
        fflush ( stdout );
        usleep(500000);
    }

抱歉!评论已关闭.