Mail Archives: djgpp/1998/10/22/13:06:23
ummurr03 AT NOSPAMcc DOT umanitoba DOT ca (LupusNoctus) wrote:
> How does one go about putting the value of an int variable into a
> string variable? it's not str dummy=intvar; that gives ascii value.
Use the sprintf function. For example:
int a;
char string[12];
a=599;
sprintf(string,"%X",a);
printf("%s\n",string);
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -