Hi,
Is there a C function to convert from int to char* or do you have to do it manually with ASCII codes?
Thanks
Hi,
Is there a C function to convert from int to char* or do you have to do it manually with ASCII codes?
Thanks
Ivan
one way of tackling the problem
#include <stdio.h>
int main(void)
{
int x=3;
char s[100];
sprintf(s,"%d",x);
puts(s);
return 0;
}
int sprintf(char* s, const char* format, ...);
Like fprintf, but output written into string s, which must be large enough to hold the output, rather than to a stream. Output is NUL-terminated. Returns length (excluding the terminating NUL).