Where is you character array.I can only see a char variable in whose you are assigning value 4 to it.
You can use itoa() or simply sprintf() to convert an integer to strings.sprintf is unsafe though,so the itoa() one is safe approach to do.See more of itoa: http://www.cplusplus...y/cstdlib/itoa/
This post has been edited by aaa111: 15 March 2012 - 11:54 PM
To convert from integer to string, (c-string to be exact), use "sprintf"
int sprintf ( char * str, const char * format, ... );
/* sprintf example */
int main ()
char buffer ;
int n, a=5, b=3;
n=sprintf (buffer, "%d plus %d is %d", a, b, a+B)/>;
printf ("[%s] is a %d char long string\n",buffer,n);