Message-ID: <358A9BD9.ECDC01C5@wambooli.com> Date: Fri, 19 Jun 1998 10:11:54 -0700 From: Dan Gookin Reply-To: dgookin AT wambooli DOT com Organization: (null)Null pointer termination MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: float convertion References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: cdapm3-0-26.iea.com Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: > On Thu, 18 Jun 1998, Jonathan Villani wrote: > > > Hi! I am currently programming 3d stuff and I would like to know how > to > > convert a float to a string. I know that in Borland C there was a > function > > called fcvt. In DJGPP, I don't know if it is possible??? > > fcvt is non-standard, and DJGPP doesn't have it. Use sprintf instead. Or you can use fprintf to "save" the value to disk, then read it back in as a string: fprintf(handle,"%f",pi); Then read it with: fgets(string,80,handle); It's kloogy, but it works. Cheers! DAN