Why is it that sometimes when I compile in debug mode some parts of the program do not work, but when I am using release mode it works. For example some FILE I/O I was doing...
Why is it that sometimes when I compile in debug mode some parts of the program do not work, but when I am using release mode it works. For example some FILE I/O I was doing...
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
Well 15 views and no answer.......let me myself take a guess........is it because Debug Mode is more Strict?
There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!
"...The only real game I thank in the world is baseball..." --Babe Ruth
"Life is beautiful"-Don Corleone right before he died.
"The expert on anything was once a beginner" -Baseball poster I own.
Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.
Are you using g++?
Try compiling with -Wall which will issue all warnings known.
It means your program still has bugs - usually ones which relate in some way to abuse of memory
Such as
- running off the end of an array / allocated memory
- use of uninitialised variables
- dereference of a pointer before allocation or after free
- assumptions about packing and or alignment
> is it because Debug Mode is more Strict?
Well it has more checks - in particular malloc and free typically have dead-mans-land zones at either end to detect overruns, and the contents are trashed as soon as you free it (to detect use-after-free errors)
> Well 15 views and no answer
Maybe so, but it's still a bump
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Sometimes in VC++, I forget that I have specific libraries setup in Debug config, and don't remember to add them to the Release config. Same thing for certain preprocessors.
May not be your problem, but I've done this more than a few times
when it happens to me, most of the time it turns out to be an uninitialized variable issue.