d_node.h
来自「这是数据结构和算法的国外经典书籍.清华大学出版社出版的<数据结构C++语言」· C头文件 代码 · 共 27 行
H
27 行
#ifndef NODE_CLASS
#define NODE_CLASS
#ifndef NULL
#include <cstddef>
#endif // NULL
// linked list node
template <typename T>
class node
{
public:
T nodeValue; // data held by the node
node<T> *next; // next node in the list
// default constructor with no initial value
node() : next(NULL)
{}
// constructor. initialize nodeValue and next
node(const T& item, node<T> *nextNode = NULL) :
nodeValue(item), next(nextNode)
{}
};
#endif // NODE_CLASS
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?