[H-GEN] stdlib.h
Luke Grant
humbug at term.webexpress.net.au
Thu Jun 18 01:59:38 EDT 1998
On Thu, 18 Jun 1998, Raymond Smith wrote:
> On Thu, 18 Jun 1998, Luke Grant wrote:
> > Could some of you please have a look in your <stdlib.h> files
> > and if any of you have a the function "itoa( *int)" could you please
> > attach it to a mail and send it back to me. Mine doesn't have this
> > function and i desperately need it.
>
> Do you mean a function to convert an int to a string? If so, you are much
> better off using sprintf from stdio.h which works just like printf except
> the first arguement is a buffer. Thus:
> #include <stdio.h>
> char buf[16];
> i = -32767;
> sprintf(buf, "%d", i);
>
Yep, thats what i wanted. Thanks a lot. You've been a great help.
Luke
More information about the General
mailing list