pattern.cpp
来自「人工智能算法包含各种情况可在Delphi和C++中使用」· C++ 代码 · 共 21 行
CPP
21 行
#include "neural.hpp"
#include <iostream.h>
#include <stdlib.h>
Pattern::getMem(int inSize, int outSize)
{
in = new float[inSize];
if(!in)
{
cerr<<"Error during memory allocation of Pattern.in[]!\n";
return(ALLOC_ERR);
}
out = new int[outSize];
if(!out)
{
cerr<<"Error during memory allocation of Pattern.out[]!\n";
return(ALLOC_ERR);
}
return true;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?