43
XYZER
7y

Always remember: Every time you write a for loop like that: for (int i = 1; i <= n; i++) a cat dies!

Comments
  • 0
    Why? :(
  • 3
    I'm more of a ++i guy. But why would this kill a cat again?
  • 2
    @lucifyer the loop goes from 1..n instead of 0..n-1
    Always remember "arrays starts at 0"
  • 4
    You obviously never experienced the joy of developing office addins. Microsoft, in its infinite wisdom decided that it would be a great idea to START ARRAYS WITH 1!
  • 0
    There’s a few cases where that makes sense, actually. Namely when dealing with children inside UI elements.
Add Comment