RE: [Dev-C++] RE: Int value to string
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2000-12-07 11:14:51
|
I don't think that there is any itoa() function in C standard library. > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > exc...@sp... > Sent: Thursday, December 07, 2000 9:15 AM > To: dev...@li... > Subject: [Dev-C++] RE: Int value to string > > > >How to convert, cast, transform, whatever a >int value to a string? > First, include stdlib.h. > Then add another string to hold the myInt value: > > char myApples[20]; > > Then all you have to do is insert this line of code: > > itoa(myInt, myApples, 10); > > This line of code takes an int (myInt), and converts it to a > string (myAples), with base 10. If you want the number in hex, > write 16. If you want it in binary, write 2. > > /Orjan > > > _________________________________________s_p_r_a_y_ > Här börjar Internet! > Skaffa gratis e-mail och gratis Internet på http://www.spray.se > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com |