📄 trace.cpp
字号:
// Trace.cpp: implementation of the CTrace class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Test.h"
#include "Trace.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTrace::CTrace()
{
m_pData=NULL;
}
CTrace::~CTrace()
{
if(m_pData!=NULL)
{
free1double(m_pData);
m_pData=NULL;
}
}
void *CTrace::alloc1 (size_t n1, size_t size)
{
void *p;
if ((p=malloc(n1*size))==NULL)
return NULL;
return p;
}
double *CTrace::alloc1double(size_t n1)
{
return (double*)alloc1(n1,sizeof(double));
}
void CTrace::free1 (void *p)
{
free(p);
}
void CTrace::free1double(double *p)
{
free1(p);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -