If I have an array that looks like
int digits[size] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 4}
I want to remove the leading zeros and to d
Try the following way:
int i = 0; while(digits[i] == 0) i++; for (; i < size; i++) result += to_string(digits[i]);