📄 element.cpp
字号:
// Element.cpp: implementation of the CElement class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Element.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CElement::CElement(const double& item,CElement* previtem/*=NULL*/,CElement* nextitem/*=NULL*/)
{
cell=item;
prev=previtem;
next=nextitem;
}
//默认已存在的元素是零
CElement::CElement(CElement *previtem/*=NULL*/, CElement *nextitem/*=NULL*/)
{
cell=0;
prev=previtem;
next=nextitem;
}
CElement::~CElement()
{
}
double CElement::Cell()
{
return cell;
}
void CElement::Set(double item/*=0*/)
{
cell=item;
}
void CElement::operator =(CElement &_c_)
{
if(this==&_c_) return ;
cell=_c_.Cell();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -