by MaulingMonkey · 11y ago · 0 comments
An defined behavior alternative:
for( size_t i = n; i --> 0; )Edit: Sorry, missed the "i-- > 0" at first. The code works, but not because of changing "unsigned" to "size_t".
It makes sense to use unsigned for sizes to save a bit (or 32 bits per size). Also less invalid possible inputs to handle.