#include<iostream.h>
#define MAX 100
typedef struct
{
int data[MAX];
int length;
}sqlist;
sqlist LA,LB,LC;
sqlist A,B;
int Merge( A,B)
{
int i=0;j=0;k=0;
LC.length=LA.length+LB.length;
while((i<A.length)&&(j<B.length))
{
if(A.data[i]<=B.data[j])
{
LC.data[k]=A.data[i];
cout<<LC.data[k]<<endl;
i++;
k++
}
else
{
LC.data[k]=B.data[j];
cout<<LC.data[k]<<endl;
j++;
k++;
}
}
while(i<A.length)
{
LC.data[k]=A.data[i];
i++;
k++;
}
while(j<B.length)
{
LC.data[k]=B.data[j];
j++;
K++;
}
return(1);
}
void main()
{
sqlist LA,LB,LC;
int i,j,k;
cout<<"请输入线形表A";
cout<<endl;
for(i=0;i<LA.length;i++)
cin>>LA.data[i];
cout<<"请输入线形表B";
cout<<endl;
for(j=0;j<LB.length;j++)
cin>>LB.length;
Merge(LA,LB);
cout<<"请输入合并后的表";
cout<<endl;
for(k=0;k<LC.length;k++)
cout<<LC.data[k];
}
E:\课程全部\C++\Cpp2.cpp(59) : error C2065: 'Merge' : undeclared identifier
error C2065: 'Merge' : undeclared identifier