llist7.cpp

来自「数据结构c++语言描述 Borland C++实现」· C++ 代码 · 共 20 行

CPP
20
字号


#include<iostream.h>
#include "llist7.h"
void main(void)
{
   int x, n = 15;
   LinearList<int> L(20);
   for (int i = 0; i < n; i++)
      L.Insert(i,i);
   cout << "The list is " << endl;
   cout << L << endl;
   cout << "After reversal, the list is " << endl;
   cout << L.Reverse() << endl;
   L.Delete(n,x).Reverse();
   cout << "After deleting the last element and reversing," << endl;
   cout << "the list is " << endl;
   cout << L << endl;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?