多行进度条 [英] Multiline progress bars

查看:227
本文介绍了多行进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道要在命令行上更新像进度条一样,使用'\r'。有没有办法更新多行?

I know that to update something like a progress bar on the command line, one uses '\r'. Is there any way to update multiple lines?

推荐答案

最好的方法是使用一些现有的库如ncurses。但是你可以尝试通过系统调用清除控制台: system(cls);

The best way is to use some existing library like ncurses. But you may try dirty workaround by clearing console with system call: system("cls");.

这篇关于多行进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆