⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 solutionset.cpp

📁 爱因斯坦谜题
💻 CPP
字号:
// SolutionSet.cpp: implementation of the CSolutionSet class.
//
//////////////////////////////////////////////////////////////////////

#include "SolutionSet.h"

void CSolutionSet::Show(CString &buf, bool only_size) const
{
	int i;
	CSolution sln;
	CString s;

	buf.Format("-------------------- 一共有 %2d 个解 --------------------\n", m_nSize);
	if (only_size) {
		return;
	}

	for (i=0; i<m_nSize; i++) {
		s.Format("\n解%d\n", i+1);
		buf += s;
		sln = GetAt(i);
		sln.Show(s);
		buf += s;
	}
	buf += "\n";
}

void CSolutionSet::Show(bool only_size) const
{
	CString buf;
	Show(buf, only_size);
	printf("%s", buf);
}

CSolutionSet& CSolutionSet::operator=(const CSolutionSet &sln)
{
	RemoveAll();
	Append(sln);
	return *this;
}

⌨️ 快捷键说明

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