CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Posts
    33

    Please tell me , "how can i convert float or double to String" kindly help me or tell me some algori

    Please tell me , "how can i convert float or double to String" kindly help me or tell me some algorithm


  2. #2
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664

    Re: Please tell me , "how can i convert float or double to String" kindly help me or tell me some al

    char str[20];
    sprintf(str, "%f", 3.14);


    ***
    I like feedback, so please rate my answer.

  3. #3
    Join Date
    Feb 2002
    Posts
    33

    Re: Please tell me , "how can i convert float or double to String" kindly help me or tell me some al

    i want a algorithm to convert float to string not the syntax like it.

    thank u for ur help


  4. #4
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664

    Re: Please tell me , "how can i convert float or double to String" kindly help me or tell me some al

    Ok, I don't think the way floating point numbers are stored in memory is standard. Different compilers etc would or can use different schemes to handle/store floating point values. That's at least true with Standard C (ISO 9899:1990). For C++, I don't really know.

    ***
    I like feedback, so please rate my answer.

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