Message-ID: <20030310150733.47704.qmail@web13001.mail.yahoo.com> Date: Mon, 10 Mar 2003 07:07:33 -0800 (PST) From: Thomas Tutone Subject: Re: float version of itoa To: djgpp AT delorie DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Joel_S" wrote: > I don't think there's a built in version of a float > to string > conversion routine, but does anybody have any code, > or know a library > that contains such a routine? Thanks. If you're using C++, just use an ostringstream: #include #include int main() { using namespace std; float f = 7.25; ostringstream os; os << f; string s = os.str(); // s now holds the string // representation of f } For more info, take a look at sections 38.1 - 38.3 of the C++ FAQ: http://www.parashift.com/c++-faq-lite/ Best regards, Tom __________________________________________________ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com