View Full Version : Debugging-Looking in the wrong places

11-03-2003, 09:28 PM
Wow, I just spent about an hour trying to figure out what was wrong with my code. I kept looking through all my classes because there was no way there was something wrong with the function since it was so simple...Turns out it was really simple:

for (int i=0;i<4;i++)
for (int i2=0;i<4;i++)

Yesss I'm never naming the second index of a nested loop anything close to the first one again

11-03-2003, 10:50 PM
Having just read Code Complete one suggestion he makes is using more meaning full names for your index variables based on what they are used for. I think this would have helped in your case.