very strange bug in C++

Hallo.
I wrote an app. in C++ using WinApi functions,
its simple prog creating and moving figures on its form and controled by editing commands in ME box.
strange thing is that there are no errors in source, when I compiled it first it work perfectly, second time(not editing a single letter in source) it does error
when i just recompile it, it works perfectly.
VC gives me warrning about using wcscpy telling that wcscpy_s is more safe(used this function very frequently) can this be the reason? or does anybody had the same situation?
There is an overflow bug in your code. The OS just re-loaded your program into the same memory it was before, and so the error you made was preconditioned to occur.
http://en.wikipedia.org/wiki/Buffer_overflow

Hope this helps.
Topic archived. No new replies allowed.