I have a little problem.
When i'am debugging my program with MSVC 6.0 I recieve no errors, but when I siply execute it in Explorer it works incorrect. What is the problem? It is the same EXE. I just can't fix bugs like that, it's too big program(a lot of code).
I think that problem could be in memory managment (malloc). I'am useing this function(malloc), but sometimes it FAILS ?? even if I have free memory(swap & RAM). My program uses only system dlls, no ather files are being used(txt....).
welcome to the real world of programming... ;)
The only thing I see for you to do is to try to find the line that fails. output for each function as a msgbox or other... when you find the line, fix the problem or post here if clueless... But I think you are right. Its the memory management (or unmanagement?!?) that is the problem.
And a word of wisdom:
Next time you write a program, you should write your code with this mysterious error in mind. You can see now when there is possible for this error to arrise again, so you will trap it. You will also know how to trap simillar bugs before you get to the stage of nightmarish debugging. Eventually, you will reach the ultimate goal, absolutely bugfree code, and a state of mind where you are in the nirvana of programming.
use the msvc++ debugger. ive heard good things about it.
if you are simply double clicking the exe in explorer, you may be executing the program in a different directory to where the IDE runs it, and therefore the working directory is different. are you opening any files or doing anything that has relative paths names at all?? you may find that could be a problem.