suppose I do that:
dMyDouble =120.2
sprintf(szMyString, "%.2f", dMyDouble);
szMyString will be "120.20"
Is there a way to get "120.2" and not by:
sprintf(szMyString, "%.1f", dMyDouble);
since I want up to 2 decimal digits
Thanks
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Results 1 to 2 of 2
Thread: another question about sprintf
|
Click Here to Expand Forum to Full Width |