[H-GEN] stdlib.h

Raymond Smith raymonds at uq.net.au
Thu Jun 18 01:51:40 EDT 1998


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);

Raymond.

---
raymond at humbug.org.au






More information about the General mailing list