(a) because see what Carmack said (b) my canonical example was for (i=0; i < n; ++i) now for (i=n-1; i >= 0; --i) // i must be signed
-
-
Replying to @nothings @RichardN7 and
for (i=n; i>0; i--) { ... (i-1) ... }
1 reply 0 retweets 1 like -
-
Replying to @nothings @RichardN7 and
I don't see why. You can use a loop-scope var for i-1 to avoid writing "i-1" multiple times.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @nothings and
Alternatively: for (size_t i=n-1; i!=-1; i--)
1 reply 0 retweets 0 likes
Replying to @RichFelker @nothings and
But your form with a signed i is erroneous; it does the wrong thing if n is large.
5:16 PM - 15 Aug 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.