cell.cpp

来自「迷宫问题」· C++ 代码 · 共 25 行

CPP
25
字号
#include"cell.h"


Cell::Cell(int i, int j, int k)				//k为前驱格子在队列数组中的序号
{
	x=i; y=j; pre=k;
}
/*Cell::Cell(int i, int j)			
{
	x=i; y=j; pre=-1; 
}
*/
bool Cell::operator == (const Cell& c) const
{
	return (x==c.x && y ==c.y);
}
bool Cell::operator != (const Cell& c) const
{
	return (x!=c.x || y !=c.y);
}Cell Cell::operator = (const Cell& c)
{
	x=c.x; y=c.y; pre=c.pre; 
	return *this;
}

⌨️ 快捷键说明

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