Greg Lindahl wrote:
> If your compiler has flags to initialize all variables to zero
Thanks, once you said this things clicked---I recalled that have gone
through this same exercise earlier. It was simply a sum not initialized
to zero before the loop. In my experience using the head first is much
more effective than the debugger. This is why I wanted to know what
kind of errors cause this sort of behavior so I could look for it. And
sure enough, it was there.
Thanks,
Aleks
|