llist5.cpp
来自「数据结构c++语言描述 Borland C++实现」· C++ 代码 · 共 25 行
CPP
25 行
// split a list into two
#include<iostream.h>
#include "llist5.h"
void main(void)
{
int n = 15;
LinearList<int> X(20), Y(20), Z(20);
// initialize list to be split
for (int i = 0; i < n; i++)
X.Insert(0,i);
cout << "The list is" << endl;
cout << X << endl;
X.Split(Y,Z);
cout << "The first split list is" << endl;
cout << Y << endl;
cout << "The second split list is" << endl;
cout << Z << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?