class List{
public:
void init(){}
private:
struct Node {
int data;
Node * next;
Node(const int& d) :data(d), next(NULL) {}
};
Node * head;//头节点
}
void List::init() {
Node *current = head;
int data = 0
初始化链表C++实现
最新推荐文章于 2024-05-15 03:48:59 发布