I was working with Visual Studio 2005 on a relatively simply problem, but it was fairly heavy in mathematical calculations. However, my program simply was not giving me the correct output and I could not figure out why. Long story short, I found out it was because I was basically doing this:
double x = 2/5;
However, I eventually found out that the compiler was turning that into 0 instead of .4! If I entered...
double x = .4;
Then it worked correctly. Is this an issue that was fixed in more recent Visual Studios, or what? I was extremely disappointed (yet also relieved since the program was so simple yet I was unable to do it!) when I figured out that it was as simple as a "fraction" being set to 0 instead of being divided out.