C Board  

Go Back   C Board > Community Boards > A Brief History of Cprogramming.com

 
 
LinkBack Thread Tools Display Modes
Old 11-03-2003, 09:28 PM   #1
carry on
 
JaWiB's Avatar
 
Join Date: Feb 2003
Location: Seattle, WA
Posts: 1,971
Debugging-Looking in the wrong places

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:
Code:
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
__________________
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)

"Work hard and it might happen."
-XSquared
JaWiB is offline  
Old 11-03-2003, 10:50 PM   #2
Registered User
 
Join Date: Jul 2003
Posts: 450
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.
curlious is offline  
 

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging Dev C++ tuurb046 Tech Board 10 08-16-2007 12:51 PM
gdb no debugging symbols found Laserve Linux Programming 8 09-17-2006 08:56 AM
debugging directx apps confuted C++ Programming 1 08-16-2003 08:56 AM
God datainjector A Brief History of Cprogramming.com 746 12-22-2002 12:01 PM
Debugging mode selection during compile time YALINI C Programming 1 09-03-2001 09:56 AM


All times are GMT -6. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22