hello fellow coders 8)
here is my idea:
i am currently working with a own media player, made with "Windows forms" and vc++. all functions works fine except for one.
i wanted to have a cpu-meter in the form of a ‘progressbar’ or even simpler; a textfield, using getcpuusage.
the problem i face is that the value i get from the getcpuusage command gives me a float value, (such as 3.23232355758E-28) and it doesnt quite represent the value i want to put in my software
i tried to cast the float value into different int’s and such, but that gave me a very low value.
i have looked in the examples directory, but it did not help me a lot since it just does a DOS-based printf with the float.
so please, anyone know how to turn the float value into a integer without destroying it?
- m0ipht asked 10 years ago
Please login first to submit.