[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 987
  • Last Modified:

Float to CString

How to convert float data to CString data?
0
edward95
Asked:
edward95
1 Solution
 
erikssonCommented:
Check out the CString::Format method.  It accepts printf() style format strings.  So you could do the following:

float fFoo = 5.6f;
CString strFloat;

strFloat.Format("%5.2f",fFoo);


0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now