#include"List.h"
#include<stdlib.h>
#include<iostream>
using namespace std;
void Test1()
{
List list1;
list1.PushBack(1);
list1.PushBack(2);
list1.PushBack(3);
list1.PushBack(4);
list1.PushBack(5);
list1.PushBack(6);
list1.PrintSList();
/* List list2(list1);
list2.PrintSList();*/
List list2=list1;
list2.PrintSList();
//list2.PopBack();
//list2.Clear();
//list2.PushFront(0);
//list2.PopFront();
//////检验Find函数
////LinkNode* ret=list2.Find(4);
////if (ret != NULL)
////{
//// cout << "ret:" << ret << " " << ret->_data << endl;
////}
////else
////{
//// cout << "Not exit !" << endl;
////}
/* int ret=list2.Amount();
cout << ret << endl;*/
//list2.Erase(list2.Find(5));
//list2.Insert(list2.Find(2), 0);
//list2.Remove(3);
list2.Reverse();
list2.PrintSList();
}
int main()
{
Test1();
system("pause");
}
双向链表(C++实现)(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/36f913b0294fef5785e31a16a1d30328.html