我收到此错误消息:
调试断言失败!
表达:_BLOCK_TYPE_US_VALID(pHead-> nBlockUse)
同时尝试做以下事情
#include <vector>
#include <algorithm>
using namespace std;
class NN
{
public:
NN(const int numLayers,const int *lSz,const int AFT,const int OAF,const double initWtMag,const int UEW,const double *extInitWt);
double sse;
bool operator < (const NN &net) const {return sse < net.sse;}
};
class Pop
{
int popSize;
double a;
public:
Pop(const int numLayers,const int *lSz,const int AFT,const int OAF,const double initWtMag,const int numNets,const double alpha);
~Pop();
vector<NN> nets;
void GA(...);
};
Pop::Pop(const int numLayers,const int *lSz,const int …Run Code Online (Sandbox Code Playgroud) 当我在调试模式下使用 VisualStudio 编译程序运行我的程序时,有时我会得到
调试断言失败!表达:
_CrtIsValidHeapPointer(block)
或者
调试断言失败!表达:
is_block_type_valid(header->_block_use)
(或两者之后)断言。
这是什么意思?如何找到并修复此类问题的根源?