http://msdn.microsoft.com/zh-tw/library/vstudio/8hyw4sy7(v=vs.90).aspx多线程
int _CrtDbgReport( int reportType, const char *filename, int linenumber, const char *moduleName, const char *format [, argument] ... ); int _CrtDbgReportW( int reportType, const wchar_t *filename, int linenumber, const wchar_t *moduleName, const wchar_t *format [, argument] ... );
这个函数是用来判断错误类型的。函数
但是问题出如今这里:spa
// crt_crtdbgreport.c #include <crtdbg.h> int main() { #ifdef _DEBUG //这里定义了一个宏 CrtDbgReport(_CRT_ASSERT, NULL, NULL, "some module", NULL); #endif }
用release版,或者把debug版本中预编译头的_debug去掉,这样在函数执行的时候就不会出现这个问题了。线程
具体是为何每次只要执行CrtDbgReport 就出现错误我也不太明白。debug
其余的什么改多线程为多线程调试…… 貌似都没用调试
还有 忽略libcmt.lib库 这个是处理冲突的库的。感受这个问题可能也是库冲突,但是找不到。code