delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/02/06:17:53

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: converting floats to strings
Date: 2 Dec 1997 06:29:06 GMT
Organization: Oxford University, England
Lines: 13
Message-ID: <6609ri$r7g$1@news.ox.ac.uk>
References: <Pine DOT GSO DOT 3 DOT 96 DOT 971201232123 DOT 20591A-100000 AT calvin DOT univalle DOT edu DOT co>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Mon, 1 Dec 1997 18:27:04 GMT in comp.os.msdos.djgpp Guillermo
Porras <guporras AT calvin DOT univalle DOT edu DOT co> wrote:

:  float float_number ;
:  char *string ;

: /*I use */  sprintf ( string ,"%f", float_number ) ;

... but remember to mallocate some memory first, or make `string' an
array rather than a pointer.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


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