Use an unsigned type (size_t) for all loop iterators.