error.cpp

来自「很好的遗传算法值得一看」· C++ 代码 · 共 43 行

CPP
43
字号
// Error.cpp: implementation of the CError class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Predigest.h"
#include "Error.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CError::CError()
{
	m_strErrorMsg = _T("");
}

CError::CError(const CError& other)
{
//	memcpy(this, &other, sizeof(CError));
	m_strErrorMsg = other.m_strErrorMsg;
}

CError::CError(const CString& errorMsg)
{
	m_strErrorMsg = errorMsg;
}

CError::~CError()
{

}

CString CError::GetErrorMessage()
{
	return m_strErrorMsg;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?