dlist.cpp
来自「这是一本数据结构与算法书中所有算法的源代码,内容非常丰富,值得一看.」· C++ 代码 · 共 19 行
CPP
19 行
#include<iostream.h>
#include "dlist.h"
void main(void)
{
int x;
LinearList<int> L(5);
cout << "Length = " << L.Length() << endl;
cout << "IsEmpty = " << L.IsEmpty() << endl;
L.Insert(0,2).Insert(1,6);
cout << "List is " << L << endl;
cout << "IsEmpty = " << L.IsEmpty() << endl;
L.Find(1,x);
cout << "First element is " << x << endl;
cout << "Length = " << L.Length() << endl;
L.Delete(1,x);
cout << "Deleted element is " << x << endl;
cout << "List is " << L << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?