Advertisement

number to string

Started by May 26, 2002 05:44 PM
16 comments, last by Lode 22 years, 5 months ago
wouldn''t you use %lf with sprintf for a double?
%f is for a float.
also if you really need to, ftoa converts a float to a string, but sprintf is easier.
quote: Original post by Jana
also if you really need to, ftoa converts a float to a string, but sprintf is easier.

Any ftoa function is non-standard.

Advertisement
are there restrictions on what can be posted?
i have been trying to post a line of code and it keeps truncating it.
Rabid STL fans? I fail to see how doing things in globally accepted standard methods is a bad thing. And besides - how did his post affect yours in any way at all? I saw it as another method of doing the same thing.

Just because you don''t wanna adapt and use standards, does not mean you neat to get all huffy when others do.


Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
quote: Original post by Jana
are there restrictions on what can be posted?
i have been trying to post a line of code and it keeps truncating it.

That''s because of HTML. See the FAQ (top right of the page).

quote: Original post by Landsknecht
Rabid STL fans? I fail to see how doing things in globally accepted standard methods is a bad thing.

Did I say it was?
quote:
And besides - how did his post affect yours in any way at all? I saw it as another method of doing the same thing.

Did I say it wasn't?
quote:
Just because you don't wanna adapt and use standards, does not mean you need to get all huffy when others do.

I got "huffy" because he claimed that one of the other methods was "ugh." I use what I damn well please, and I'm not telling you to do any differently, so lay off.

Later,
ZE.

EDITED for typos



//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

[edited by - zealouselixir on May 26, 2002 12:17:06 AM]

[twitter]warrenm[/twitter]

Advertisement
quote: Original post by Lode
How to convert a number to a string?

When you post questions like this, you should state which language you are using.
quote: Original post by ZealousElixir
All the rabid STL fans out there are making me sick

Oh come on, you know that''s flame-bait!

[ C++ FAQ Lite | ACCU | Boost | Python | Agile Manifesto! ]
quote: Original post by SabreMan
When you post questions like this, you should state which language you are using.


You''re right, I forgot that...

Well most of you seemed to know what language it was

Thanks.

This topic is closed to new replies.

Advertisement