convert CString to foat using _ttoi

Written by


i am converting CString to float using _ttoi

CString p; p=("1.122");
CString y;
float o;
o=_ttoi(p);
y.Format(_T("%f"),o);
TRACE(y);

but answer is 1 and i need 1.122 :(

can anyone help me??

Excerpt from:
convert CString to foat using _ttoi

Related posts:

  1. Converting CString to int Hi all, I am getting a value from a...
  2. convert CString to const wchar_t *. Hi all please tell me how can i convert...
  3. Convert to uppercase(Capital Letter) In my code I want to convert a CString...
  4. Changing of CString to const char* I tried the following code. However, the compiler keep...
  5. Covert CString to char* in Visual C++ 2005 Hi, I am using VC++ 2005 to write an...

Related posts brought to you by Yet Another Related Posts Plugin.

Nov
23

Leave a Reply