The internet says the problem is because there are wild pointers or pointers to access illegal memory. But how to solve the problem exactly. I don't know if this method is used. But in my project (useful to MFC calls MATLAB), there is a method can be very good solution, can not only recall the program can also be debugging without the above error (the brother took one weeks to find such a solution):
To add a MATLAB path:
Project-->c/c++-->category:preprocessor-->additional Include Directories: Add C:\Program files\matlab\ R2010a\extern\include (this is in the MATLAB installation path)
Project-->link-->category:input-->additional Library Path: Add C:\Program files\matlab\r2010a\extern\lib\ Win32\microsoft (this is in the MATLAB installation path)
After adding these two paths, the problem is resolved.
If this error occurs later, the MATLAB DLL file may have been replaced,
The workaround is: all recompile and link: build-->rebuild all