   Help tracking down an error
  im using MSVC++2005 and are getting this runtime error immidiatly when i start the program:'Unhandled exception at 0x0040167a in Baladyfarm.exe: 0xC0000094: Integer division by zero.'So obviusly im dividing with zero somewhere. How can i track it down? i have readhttp://www.gamedev.net/reference/programming/features/debugging/default.asp but im obviusly not taking the right approach.   
  Track down the division operations (*and mod (%) operations*) in your program, and set watches for the denominators (divided-by values), maybe?   ;  denominators?   ;Quote:Original post by MadsGustafdenominators?Quote:Original post by Zahlmandivided-by valuesIn "x / y", y is the denominator. In "x % y", y can also be problematic if it is zero.   ;  what is ment by  'set watches'? is it just a saying for "watching them closely?"   ;  I think the response meant that you could put in some code so that y (from his example) is checked to ensure it's not zero before the division takes place   ;  thanks all! i found the problem :)   ;Quote:Original post by MadsGustafwhat is ment by  'set watches'? is it just a saying for "watching them closely?"If you are using a debugger (which you should be), you can set the debugger to watch variables (or, more generally, addresses) for you -- to break (stop the execution of the program, pointing you towards when the error occurs) when something happens to that value (if it's read, or if it's written, for example). Wikipedia has a fairly uninspiring article.   ;Quote:Original post by MadsGustafwhat is ment by  'set watches'?Isn't that explained in the article?Quote: thanks all! i found the problem :)Um, glad I could help, I guess.   