|
From: Daniel G. <sp...@ho...> - 2003-04-01 07:07:42
|
What about itoa and atoi functions? >From: "Ioannis Vranos" <iv...@em...> >To: "Dev-C++ Mailing List" <dev...@li...> >Subject: RE: [Dev-C++] integer to string >Date: Tue, 1 Apr 2003 06:13:20 +0300 > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf > > Of Khalid El-Kary > > Sent: Tuesday, April 01, 2003 5:43 AM > > To: Dev...@li... > > Subject: [Dev-C++] integer to string > > > > > > Hi fellows, > > > > I'm wondering if there's a possible way to turn an integer to > > its string > > representation in C > > > > //I want to get a string "5" out of f > > int f=5; > > > > thanx in advance. > > > > Regards, > > Khalid Al-Kary > > > >#include <stdio.h> > >/* ... */ > >int f=7; > >char s[5]; > >sprintf(s, "%d", f); > > > >Ioannis Vranos > >* Programming pages: http://www.noicys.freeurl.com >* Alternative URL: http://run.to/noicys > > > > >------------------------------------------------------- >This SF.net email is sponsored by: ValueWeb: >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! >No other company gives more support or power for your dedicated server >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile/mobilehotmail |