node.h

来自「人工智能中的广度搜索的九宫问题 用VC实现」· C头文件 代码 · 共 22 行

H
22
字号
# ifndef node_h
# define node_h
# include <iostream>
# include <string>
using namespace std;
class cnode
{
	friend class clist;
public:
	cnode();
	cnode(const string &);
	void setDadptr(cnode *value) {dadptr=value;}
	cnode *getDadptr() {return dadptr;}
   	string GetData() const {return data;}
private:
	string data;
	cnode *nextptr;
	cnode *dadptr;
};
cnode::cnode() : nextptr(0),dadptr(0) {}
cnode::cnode(const string &value) : data(value),nextptr(0),dadptr(0) {}
# endif

⌨️ 快捷键说明

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