convert double to char!
C / C++ / MFC
4
Posts
3
Posters
0
Views
1
Watching
-
how do you convert double to char? i mean to keep it the way it is as double for display. exp: 3.5 will be 3.5 as char (maybe to CString or array since this is 3 characters)
-
CString str;
double dblValue = 2.25;str.Format("%0.2f",dblValue);
//0.2 means 2 chars after decimalHope it helps :) C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
-
how do you convert double to char? i mean to keep it the way it is as double for display. exp: 3.5 will be 3.5 as char (maybe to CString or array since this is 3 characters)