Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
zhang3r
· 11y ago · 0 comments
-1 in 2's complement is actually MAX_INT in unsigned. Since numBurritos is also an unsigned int it would never exceed MAX_INT making this approach work.
Comments
[–]
masklinn
11y ago
Wouldn't it be SIZE_MAX since i is a size_t?
[–]
knodi123
11y ago
thanks! that was very helpful, and pitched right at my knowledge level.