News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

thanks for reply

Started by zdai, November 28, 2007, 02:23:53 AM

Previous topic - Next topic

zdai

Thank you guys. The program in VC++ works well in windows OS. Many people are using it for several years. I have changed anything related to MFC, then compiled and built it in C::B IDE, no warning and no error. When I clicked "RUN" botton on tool bar of C::B IDE, several seconds later the program terminated without error, but the output was not correct. I debugged it step by step, the output was correct. It is that I said "works in debug mode, does not in release". Thanks again.

alchemist

Kind Regards,
Xavier Miller.
[url="http://xaviermiller.be"]http://xaviermiller.be[/url]

thomas

What you describe typically happens if you don't initialise a variable properly. Maybe in the "changed anything related to MFC" something like that happened.

The debugger initialises all variables to 0, so code like if(foo != 0) will work as expected in the debugger but will fail without it.

With some luck, the compiler will give you an appropriate warning if you compile with -Wall (although it does not detect it in every case). Otherwise, this can be a long, painful search.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."