• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

C/C++ CString.Format

Originally posted by: IHateMyJob2004
I have the following line of code:

someCString.Format("%.1f", someDouble);

I am getting a formatted string of "1.$". Why is this so?


You are requesting a to convert a floating point with 1 significant digit into a string... but you are feeding it a double type.

 
Originally posted by: sao123
Originally posted by: IHateMyJob2004
I have the following line of code:

someCString.Format("%.1f", someDouble);

I am getting a formatted string of "1.$". Why is this so?


You are requesting a to convert a floating point with 1 significant digit into a string... but you are feeding it a double type.

This works. I did find that we were accidentally passing in infinity as the arugment, thus the 1.$.
 
Back
Top