0
IndiraP's Avatar, Join Date: Nov 2012
Go4Expert Member
yup..
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
My favourite debugging technique is to get in there with a debugger, or failing that to sprinkle printf statements liberally across the code to display variables and why we are where we are, and find out what the program is *actually* doing. If you try debugging code based on what you *think* it's doing then you'll get nowhere, because you'll always think the code is doing what you were thinking when you wrote it - hence you not realising that ++ was in the wrong place.
0
IndiraP's Avatar, Join Date: Nov 2012
Go4Expert Member
yes sir...i will try to use printf to see wats actually happening from now on..