CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    8

    convert CString to foat using _ttoi

    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??
    Last edited by lasha; November 23rd, 2009 at 06:40 PM.

  2. #2
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,721

    Re: convert CString to foat using _ttoi

    _ttoi converts to int ... try _ttof

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured