Convert CString to Currency

Apr 30, 2013 at 6:46am
How can i convert CString to Currency.
Apr 30, 2013 at 8:13am
It depends on the format and actual currency.
Apr 30, 2013 at 8:37am
thanks for your valuable reply. the actual currency is in rupees.
i want to do a simple conversion.
for example:
CString Data = "12345";
Now if i have currency type variable, then how can i use CString variable.
i want to make CString Value to currency type.
How can i convert this.
Apr 30, 2013 at 8:40am
Do you just want to make it a number, or do you want to reformat it as a string?
Apr 30, 2013 at 8:52am
i just want to make it a number.
and how to use currency data type in mfc, can you give an example.
waiting for your valuable feedback....
Last edited on Apr 30, 2013 at 9:14am
Apr 30, 2013 at 9:42am
1
2
CString Data = "12345";
double n = atof(Data);


You'll need to include stdlib.h
http://msdn.microsoft.com/en-GB/library/hc25t012%28v=vs.71%29.aspx
Apr 30, 2013 at 10:17am
thank you for you kind assistance.
Topic archived. No new replies allowed.