I'm trying to format a certain string as shown in the snippet that I'm posting.
For example, if 100*zshow is 3.5, I would like the string to show 03.5. Another case would be if 100*zshow is 10.2, it should show 10.2. However, this is not the case with 3.5, as it shows 3.5 rather than 03.5. I have also tried the flag "%03.1f", but it didn't work all that well either with respect to adding the extra zero when I don't have enough digits. What would be the easiest way to add the zero when needed?Code:CString display; display.Format("%3.1f", 100*zshow);