Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to convert CString value to float supported by CZECH (Check Republic).
Example : When Converted to CZECH.
-------

CString valStr;
valStr = "100,34" (Comma is present when convert to CZEH).
Now when converting to float value by c function atof(valStr) i am getting 100.00
truncating the value 34.

i have to get the result as 100.34 Please suggest how to perform this senario
for CZEH languge in reginal laguage settings is performed in Computer.


Thanks,
uday.
Posted

1 solution

You need to add the locale information for Czech locale, as described in http://msdn.microsoft.com/en-us/library/hc25t012.aspx[^], at the function:
C++
double _atof_l(
   const char *str,
   _locale_t locale
);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900