Subj : Re: what's difference between release and debug compiler in MS vc6.0? To : comp.programming From : Gerry Quinn Date : Mon Oct 10 2005 03:37 pm In article , liuxb@lucent.com says... > Environment: MS Visual C++ Studio 6.0 > > One of my friend write one program and run it in release > compile and debug compile mode. But the result from two > mode are different.It confused me a little. > > Does someone know what's the possible reason to cause > differnt run-result between release and debug compile mode? Bugs, usually. The debug version allocates memory differently, and puts special values into allocated memory locations (so the debug version will have some large unlikely value in a new int, while the release version will probably have 0 but might have anything). If you forget to initialise a value, or if you have pointer overruns, the debug and release versions will probably behave differently. Also, ASSERT macros will be executed in debug but not release, so if they have side effects that will make a difference. - Gerry Quinn .