klist.cpp

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

CPP
26
字号



// test formula-based linear list class
// with zero fill

#include <iostream.h>
#include "klist.h"
#include "xcept.h"

void main(void)
{
   try {
      LinearList<int> L(15);
      L.Insert(0,9).Insert(0,8).Insert(0,7).Insert(0,6);
      L.Insert(0,5).Insert(0,4).Insert(0,3);
      cout << "List is " << L << endl;
      cout << "List with 5 zeroes inserted after element 2 is "
           << endl << L.InsertZero(2,5)
           << endl;
      }
   catch (...) {
      cerr << "An exception has occurred" << endl;
      }
}

⌨️ 快捷键说明

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