I have searched the forum , also over internet but i didn't found any understandable method to convert float number to string , Please help Me in conversion.
Majestics 84 Posting Pro
Recommended Answers
Jump to Postlook up stringstream. However, note that some floats cannot be completely represented by a stream. Therefore, only a "limited" number of digits will appear in the decimal portion of the string. Consider the float representation of 1/3. I'ts 0.3333... where 3 goes on indefinitely. When converted to a string the …
Jump to Post>Is there a reason not to use strtod( )?
I can only think of one reason, but it's a doozy. strtod works in the wrong direction. The OP wants a conversion from float-point to string, not string to floating-point.
All 7 Replies
Lerner 582 Nearly a Posting Maven
Sci@phy 97 Posting Whiz in Training
TheBeast32 54 Posting Whiz in Training
vmanes 1,165 Posting Virtuoso
Narue 5,707 Bad Cop Team Colleague
vmanes 1,165 Posting Virtuoso
stilllearning 148 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.