hi,
Welcome to the world of heap corruption, memory leaks and postmortem dump analysis.
You need to use WinDbg for such issues .
Actualy, your application is leaking memory . So,
what is a memory leak[
^]
If you Google for "dd/vctools/crt/crtw32/misc/dbgheap.c", you will see that it is a general error message for memory leak . It has nothing to do with where you save your programs.
You need to attach your application to WinDbg and then execute it.
You can directly see the call stack. This is called live debugging.
OR
In your case i think a memory dump must be generated automatically. you can analyze this dump
to see which line of code is causing the error . the 'reasons' will become pretty clear ;)
I do not want to give you overdose of info, in case all these things sound new to you. Better go slow and try to learn these useful skills.
Helpful series of articles related to WinDbg[
^]
You can google more for WinDbg, dump files, pdb files etc .
hope this was helpful!