cellid.cpp

来自「此次上传的使linux下的文件传输协议」· C++ 代码 · 共 45 行

CPP
45
字号
// CellID.cpp: implementation of the CCellID class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Prog.h"
#include "CellID.h"

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

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

CCellID::CCellID(int nRow, int nCol):row(nRow), col(nCol)
{

}

CCellID::~CCellID()
{

}

int CCellID::IsValid()
{
	return (row>=0 && col>=0);
}

int CCellID::operator==(const CCellID& rhs)
{
	return (row == rhs.row && col == rhs.col);
}

int CCellID::operator!=(const CCellID& rhs)
{
	return !operator==(rhs);
}


⌨️ 快捷键说明

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