-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.h
More file actions
34 lines (31 loc) · 816 Bytes
/
Node.h
File metadata and controls
34 lines (31 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Created by Donghui Zheng on 2020/12/21 8:45.
//
#ifndef OPERATION_OF_LARGE_INTEGERS_NODE_H
#define OPERATION_OF_LARGE_INTEGERS_NODE_H
#include <iostream>
using namespace std;
//节点类.
class node {
public:
//存储的数据.
int data;
//前驱指针和后继指针.
node *prev, *next;
/**
* @details 无参构造函数.
* @param void.
* @return
*/
node() : data(0), prev(nullptr), next(nullptr) {}
/**
* @details 有参构造函数.
* @param item:数据.
* @param prevNode:前驱指针.
* @param nextNode:后继指针.
* @return
*/
explicit node(const int &item, node *prevNode = nullptr, node *nextNode = nullptr) :
data(item), prev(prevNode), next(nextNode) {}
};
#endif //OPERATION_OF_LARGE_INTEGERS_NODE_H