Ibrahim Haddad wrote:
>
> Hello,
>
> I have the Slakware distribution of Linux (kernel 2.0.29). I don't have
> neither "itoa" nor "ltoa". Any other alternatives? (or even, where can I
> get these functions from?)
> > There is a function called itoa which convert an integer to a string
> >meanwhile there is
> >also the ltoa function which convert a float to a string !
> > Check out the ltoa and itoa functions !
>
> Thanks.
>
> -ibrahim
Hello,
Also on your distribution you can find itoa it is part
of stdlib
Syntax
#include <stdlib.h>
char * itoa(int value, char *string, int radix)
Description
This function converts its argument value into a null-terminated
character
string using radix as the base of the number system. The resulting
string with a
length of upto 33 bytes (including the optional sign and the terminating
NULL is
put into the buffer whose address is given by string. For radixes other
than 10,
value is treated as an unsigned int (i.e., the sign bit is not
interpreted as such).
The argument radix should specify the base, between 2 and 36, in which
the
string reprsentation of value is requested.
Return Value
A pointer to string.
you can also use the sprintf function
regards
Henk Jan