Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

double to cstring 1

Status
Not open for further replies.

PaolaS

Programmer
Aug 23, 2001
8
ES
How can I convert a double to CString?

Thank you in advance
 
Try the Format member function of CString. MSDN Library should provide the details you'll need.
 
CString str;
double dDouble;
str.Format('Double is = %2lf',dDouble);
AfxMessageBox(str);

where 2 is the number of decimals you desire.

HTH, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top