今天不知怎么的VS2013调试出现缓冲区溢出,之前是可以调试成功的!求大神麻烦解决下,必重谢!
代码都不发,别人怎么帮你。。。。。。。
#include
#ifdef _DEBUG
#include
#include
#include
#include
#include
_CRT_ALLOC_HOOK _pfnAllocHook = _CrtDefaultAllocHook;
int __cdecl _CrtDefaultAllocHook(
int nAllocType,
void * pvData,
size_t nSize,
int nBlockUse,
long lRequest,
const unsigned char * szFileName,
int nLine
)
{
return 1; /* allow all allocs/reallocs/frees /
}
#endif / _DEBUG */
int _debugger_hook_dummy;
__declspec(noinline)
void __cdecl _CRT_DEBUGGER_HOOK(int _Reserved)
{
/* assign 0 to _debugger_hook_dummy so that the function is not folded in retail */
(_Reserved);
_debugger_hook_dummy = 0;
}
内存溢出就是不分内存没有释放呗,好好查一查有没有什么new的对象没有delete掉