I fear there\'s a simple and obvious answer to this question. I need to determine how many digits wide a count of items is, so that I can pad each item number with the m
You can loop through and delete by 10, count the number of times you loop;
int num = 423; int minimum = 1; while (num > 10) { num = num/10; minimum++; }