Last Updated: February 25, 2016
·
269
· kcdragon

Check that the right hand side of the Increment/Assignment Operator doesn't include the Variable before spending hours debugging why numbers are so big

When you change a[i] = a[i] + 1 to a[i] += 1 make sure you remove the second a[i] otherwise you will be left with a[i] += a[i] + 1 which will be interpreted as a[i] = a[i] + a[i] + 1