The reason why is that you'll get an infinite loop
it's ovelflow because size_t is an usinged integral type. and an usinged integer types implement modulo arithmetic. the modulo is equal to 2^N, where N is the number of bits in the value representation of the type, for this reason usinged integer types like "size_t i = 0" got a wrap around behaviour of usinged values, i think that's why it's get the infinite loop.. in other hand "int i = 0" not get infinite loop or any wrapping around behaviour because it's a singed integer value, singed integer only overflow during arithmetic computations produces udefined behaviour ..................... That What I Understand By Searching On Web, Am i Correct?