4 ms·
Can you not do: for (size_t i = len-1; i < len; i--)? Isn't -1 defined to be the largest integer that the unsigned type can handle? Edit: I guess that wasn't t
by drobi 8y ago
Can you not do: for (size_t i = len-1; i < len; i--)? Isn't -1 defined to be the largest integer that the unsigned type can handle?
Edit: I guess that wasn't the point of your example (that it may not be easily recognisable as a bug?)
- civility 8y agoYeah, that works, but it's going to confuse more than half the people who ever look at it.