Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a string from a double 1

Status
Not open for further replies.

davikokar

Technical User
May 13, 2004
523
IT
Hallo,

I am working in ansi c, so I dont know if this is the right place to post, but I could't find anything more similar. My question is how to "convert" a double into a string. I mean: if the double is mydouble = 1.55 the string would contain "1.55".

Any idea? (In ansi c)

thanks
 
sprintf would be the function to use.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
BTW, there's another board here that's just named "C".
 
thanks to both. I will try it. BTW: I could not find the C forum. In browse forum is not listed and a search with "c" return nothing...
 
From any page, Browse Forums, then Programmers, then Languages. C is 7th from the top in the right-hand column.

Good Luck,

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top