From: Darren Noble To: djgpp AT delorie DOT com Subject: Re: Convert int to string?? Date: Wed, 28 Jul 1999 10:29:49 -0600 X-Mailer: KMail [version 1.0.17] Content-Type: text/plain References: <199907281451 DOT KAA28958 AT delorie DOT com> MIME-Version: 1.0 Message-Id: <99072810315800.00592@dome.calderathin.com> Content-Transfer-Encoding: 8bit Reply-To: djgpp AT delorie DOT com ther is a funtion itoa. you sould use it like this: itoa(palette_color_r, text, 10); // 10 being the base you want the intiger to // be int the string On Wed, 27 Jan 1999, you wrote: > I know, I've posted way to much stuff today, > > Sorry if it bother people, so here's my question and I believe it may not > be on topic, (by the way if someone could please write a message saying how > explicitely DJGPP the mailing list must be) I want to convert an integer to > a string. I can convert a string to an integer using atoi but there seems > to be no c library function to do the opposite. So it's either so simple > that theres no point in a function or well there's a function which there > isn't. So code goes below...=) > > char text[3]; > > int palette_color_r; > > text[3] = palette_color_r; // I can't cast so what? > > Thanks for the help...from Dan Gold > > -=-=[CATACOMB ABYSS]=-=- > http://www.geocities.com/SiliconValley/Port/1547/ -- Linux Rules Darren 'The' Noble