📄 d_dnode.h
字号:
#ifndef DOUBLY_LINKED_NODE_CLASS
#define DOUBLY_LINKED_NODE_CLASS
template <typename T>
class dnode
{
public:
// the members of a dnode object are used for operations within a
// doubly linked list; access is simplified by making them public
T nodeValue; // data value of the node
dnode<T> *prev; // previous node in the list
dnode<T> *next; // next node in the list
// default constructor. creates object with value T(), the
// default value of type T. set the node pointers to point at
// the node itself
dnode()
{
next = this; // the next node is the current node
prev = this; // the previous node is the current node
}
// constructor with an argument to initialize nodeValue.
// set the node pointers to point at the node itself
dnode(const T& value): nodeValue(value)
{
next = this; // the next node is the current node
prev = this; // the previous node is the current node
}
};
#endif // DOUBLY_LINKED_NODE_CLASS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -