#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-08-01 20:04:45 发布
本文详细探讨了C++中如何实现链表数据结构,并重点讲解了链表迭代器的概念和使用,包括迭代器的增删查改操作,以及在实际编程中的应用示例。

最低0.47元/天 解锁文章
1540

被折叠的 条评论
为什么被折叠?



