#include <iostream>
using namespace std;
class MyList{
public:
MyList():head(NULL){
}
~MyList(){
while(head){
Node *temp;
temp = head;
head = head->next;
delete temp;
}
}
public:
struct Node{
Node(int x, Node *ptr=NULL)
C++——链表的实现以及迭代器
最新推荐文章于 2024-07-25 09:47:19 发布