By definition, size_t
is the result of the sizeof
operator. size_t
was created to refer to sizes.
The number of times you do something (10, in your example) is not about sizes, so why use size_t
? int
, or unsigned int
, should be ok.
Of course it is also relevant what you do with i
inside the loop. If you pass it to a function which takes an unsigned int
, for example, pick unsigned int
.
In any case, I recommend to avoid implicit type conversions. Make all type conversions explicit.