www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/24/04:17:39

Date: Mon, 24 Feb 1997 09:58:03 +0100 (MET)
From: Miguel Murillo <mmurillo AT ideafix DOT cps DOT unizar DOT es>
To: Michael Dylan Ryan <mdr6 AT dana DOT ucc DOT nau DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Converting Float to String...
In-Reply-To: <5eqq5r$kkt@ruby.ucc.nau.edu>
Message-ID: <Pine.LNX.3.95.970224095550.15328A-100000@ideafix.cps.unizar.es>
MIME-Version: 1.0


On 24 Feb 1997, Michael Dylan Ryan wrote:

> 
> Can someone tell me if there is a function to convert a floating point
> number to a string in DJGPP 2.0.  I can not find one.  In borland it is
> FCVT().  Please help.... thanks
> 

Try : int sprintf( char *str, const char *format, ...);
	float x;
	char str[100];
	sprintf(str,"%f",x);

ANSI-C.

Good Luck				Miguel Murillo
	

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019