Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: ummurr03 AT cc DOT umanitoba DOT ca (LupusNoctus), djgpp AT delorie DOT com Date: Thu, 22 Oct 1998 15:22:52 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: conversion int-->string In-reply-to: <3634626c.29813659@news.cc.umanitoba.ca> X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp AT delorie DOT com 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