#include<iostream>
#include<stdio.h>
#define LIST_INIT_SIZE 100
using namespace std;
struct Node
{
int *elem;
int Length;
int Listsize;
};
//函数声明部分
void Error(char *s); //错误处理函数
void printNode(Node &l); //输出函数
void InitNode(Node &L); // 初始化函数
void CreatNode(Node &l); //顺序表创建函数
void InvertNode(Node &l); //顺序表就地逆置函数
void MeryNode(Node &L1, Node &L2,Node &L3);//顺序表连接函数
void AdjustNode(Node &l); //顺序表调整函数
//函数定义部分
void Error(char *s) //错误处理函数
{
cout << s << endl;
exit(1);
}
void InitNode(Node &L) //初始化函数
{
L.elem = new int[LIST_INIT_SIZE];
if (!L.elem)
Error("Overflow!");
L.Length = 0;
L.Listsize = LIST_INIT_SIZE;
}
void CreatNode(Node &l) //创建顺序表
{
int n;
cout << "请输入元素个数:";
cin >> n;
cout << "请输入数据元素:" << endl;
for (int i &