sharecpp.cpp

来自「某个实验事编写粗糙集智能信息处理的程序」· C++ 代码 · 共 34 行

CPP
34
字号
 #include "roughset.h"
#include "stdafx.h"
#include "shareclass.h"

/////////////////////
//   PosD class    //
/////////////////////


PosD::PosD(int i)		 //Construction,allocate the PosSet
{
	PosNum=0;
	PosSet=new int[i];
}

void PosD::DeletePos()			 //free the PosSet
{
	delete []PosSet;
}
	
//compare
bool PosD::compare(PosD* right)
{
	if(PosNum!=right->PosNum)
		return false;
	else
	{
		for(int i=0;i<PosNum;i++)
			if(PosSet[i]!=right->PosSet[i])
				return false;
		return true;
	}
}

⌨️ 快捷键说明

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