element.cpp

来自「一个红蓝绿游戏」· C++ 代码 · 共 58 行

CPP
58 行
字号
// Element.cpp: implementation of the Element class.
//
//////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <string.h>
#include "Element.h"

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

Element::Element(int x,int y,int z)
{
SetX(x);
SetY(y);
SetZ(z);
}

Element::~Element()
{

}

//DEL void Element::GetX() const
//DEL {
//DEL 
//DEL }

int Element::GetX() const
{
return X;
}

int Element::GetY() const
{
return Y;
}

int Element::GetZ() const
{
return Z;
}

void Element::SetX(int x)
{
X=x;
}

void Element::SetY(int y)
{
Y=y;
}

void Element::SetZ(int z)
{
Z=z;
}

⌨️ 快捷键说明

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