cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/28/06:23:11

From: Maxximo <mssmsoft AT my-dejanews DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Integer -> String
Date: Wed, 28 Apr 1999 07:37:52 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 24
Message-ID: <7g6dsg$hjq$1@nnrp1.dejanews.com>
References: <37267AA1 DOT EA49DE45 AT student DOT cowan DOT edu DOT au>
NNTP-Posting-Host: 138.132.53.11
X-Article-Creation-Date: Wed Apr 28 07:37:52 1999 GMT
X-Http-User-Agent: Mozilla/3.04Gold (X11; I; OSF1 V4.0 alpha)
X-Http-Proxy: 1.0 x8.dejanews.com:80 (Squid/1.1.22) for client 138.132.53.11
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <37267AA1 DOT EA49DE45 AT student DOT cowan DOT edu DOT au>,
  Mark Randell <drandell AT student DOT cowan DOT edu DOT au> wrote:
> Hi. I was wondering what statement is used to convert and integer to a
> string, much like atoi converts a string to an integer. Thanks.
>
>

You can simply use a sprintf().

Try this:

main()
{
	char string[20];

	sprintf(string,"%d",100);
}





-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


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