#2
令狐少侠562016-03-11 21:12
|
int compare(sqlist A,sqlist B)
{
j=0;
while(j<A.length&&j<B.length)
{
if(A.elem[j]<B.elem[j]) return (-1);
else if(A.elem[j]>B.elem[j]) return(1);
{
else j++;
}
}
if(A.length==j<B.length) return (0);
else if(A.length<j<B.length) return (-1);
else return(1);
}