From: eglebbk AT dds DOT nl (Evert Glebbeek) Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie here: How do i convert a number to a string? Date: Thu, 31 Aug 2000 22:48:49 GMT Organization: Physics student, University of Amsterdam Lines: 26 Distribution: world Message-ID: <39aebcee.40162519@news.wins.uva.nl> References: <20000830103233 DOT 2091 DOT qmail AT web509 DOT mail DOT yahoo DOT com> NNTP-Posting-Host: stol-117-126.uva.studentennet.nl X-Trace: info.wins.uva.nl 967762198 5732 145.98.117.126 (31 Aug 2000 22:49:58 GMT) X-Complaints-To: usenet AT science DOT uva DOT nl NNTP-Posting-Date: Thu, 31 Aug 2000 22:49:58 +0000 (UTC) X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Newsgroup: comp.os.msdos.djgpp From: Chris Amos On Wed, 30 Aug 2000 03:32:33 -0700 (PDT) >I have looked though my c books but i think there is no ansi standard >way of doing that and thats why i couldnt find anything. There is. As others pointer out, sprintf() will work. >I looked in the rhide index of help and all i could find was the > >char * ecvt (double value, int ndigits, int *decpt, int *sign) > >command. Its not standats ansi, and there wasnt even an example given. >So i have no idea what to do. If your wondering why i want to do this, >well its because im using allegro's text output functions and all it >can print is strings. :( Use textprintf() instead of textout(). It takes a printf() style format string and arguements. Truely useful. I'm not sure in what version of Allegro it was introduced, if it's not in your version you may have to update. HTH, Evert Glebbeek