cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/09/12:12:45

Date: Mon, 9 Feb 1998 11:05:21 -0600 (CST)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Lester Davis <ringo1 AT bellsouth DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: integer to string
In-Reply-To: <34DE1449.185C@bellsouth.net>
Message-ID: <Pine.GSO.3.96.980209110437.829A-100000@2260u09.eecs.uic.edu>
MIME-Version: 1.0

You can use sprintf function.

sprintf(str, "%d", Mypid);

but you have to allocate memory first for str either dynamically or
statically. 


On Sun, 8 Feb 1998, Lester Davis wrote:

> Im tring to insert the num rturned by getpid(unix sytem call) into a
> string. cna someone tell me how to do this if the 
>  int is Mypid and the ptr to the string is *str.
> 
> thanks
> 
> -- 
>                                (.~.)
> =========================--oOO--(_)--OOo--=========================
> 
> Lester (Ringo) Davis
> 

- Raw text -


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