3 ms·
Totally agreed, but in this case if the author had declared the variable in the for-loop: for(int y=0; y < ymax; y++) ... and didn't shadow y from an
by GFK_of_xmaspast 11y ago
Totally agreed, but in this case if the author had declared the variable in the for-loop:
for(int y=0; y < ymax; y++)
...
and didn't shadow y from an enclosing scope, that would have given the compiler a chance to catch that error.