c ++中进程的进度 [英] The progress of a process in c ++
本文介绍了c ++中进程的进度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想编写一个C ++程序,让我知道百分比过程的进度。
示例:我想知道某种类型的Evolution的百分比。
我希望得到你的帮助。
谢谢你
I want to write a C ++ program that allows me to know the progress of a percentage process.
Example: I want to know the percentage of the Evolution of a sort.
I would like your help.
Thank you
推荐答案
你必须首先计算所有将成为100%的步骤然后获取已经完成的步骤以获得实际值。
You must at first compute all steps which will be the "100%" and than fetch the already fullfilled steps to get actual value.
int percentage = (100 * actualSteps) / allSteps;
对于这个百分比,你需要一些展示。这是一篇关于进度控制的好文章。
这篇关于c ++中进程的进度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文