|
From: Ken B. <ke...@al...> - 2003-04-01 14:31:51
|
Perhaps you mean LTOA? As in:
char * ltoa ( long value, char * buffer, int radix );
Ken Bradford
Alpha II Service, Inc.
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of Ricardo
> L=F3pez Ruiz
> Sent: Tuesday, April 01, 2003 3:50 AM
> To: Khalid El-Kary; Dev-C++
> Subject: Re: [Dev-C++] integer to string
>
>
> perhaps this example can help you a little more.
> Ricardo.
>
>
> **********ITOA/ATOI **********
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> char cad[20];
>
> /* the transformation: integer --> string */
> itoa(2003,cad,10); // 2003 is the number to store in cad[]
> printf(cad); // in decimal base =3D 10.
>
> /* and the inverse transformation: string --> integer */
> printf("\n %d",atoi(cad)); // cad[ ] is transformed to integer
>
> printf("\n\n");
> system("PAUSE");
> return 0;
> }
>
> *************************************
>
>
>
> -------------------------------------------------------
> 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
>
|