Hi all;
I basically want to add leading zero's to a char when going from int to a char in snprintf.
See example :
ThanksCode:unsigned char len[2]; int length = 144; snprintf(len, 2, "02%d", length); /*this would add leading zeros to the integer*/ snprintf(len, 2, "02%c", length); /*this doesnt work for a char, any ideas?