Integer To a String in C
h is an int; number in the 5000's.
char *ret; got a for loop running this is where h is being set. i need to add -h to the end of ret. so ret will look something like this when the loop is done 5000-5001-5002 but a string. :scratch: |
You're looking for itoa();
This is a good little tutorial on itoa() and some others you might be interested in: http://www.iota-six.co.uk/c/g3_atoi_...ntf_sscanf.asp Hope this helps. |
sprintf() will also do what you need.
Code:
void foo(char *ret){ |
All times are GMT -5. The time now is 05:32 PM. |