热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_73602323
是小艾
3 年前
trueweixin_73602323

#include <stdio.h>
#include <malloc.h>
#define MaxSize 50
typedef int ElemType;
typedef struct
{
ElemType data[MaxSize];
int length;
}Sqlist;

void InitList(Sqlist *&L)
{
L=(Sqlist*)malloc(sizeof(Sqlist));
L->length=0;
}

void CreatList(Sqlist *&L,ElemType a[],int n)
{
int i;
for(i=0;i<=10;i++)
{
L->data[i]=a[i];
}
L->length=n;
}

void DispList(Sqlist *L)
{
int i;
for(i=0;i<L->length;i++)
{
printf("%d\n,L->data[i]");
}
}

int ListLength(Sqlist *L)
{
return L->length;
}
bool ListEmpty(Sqlist *L)
{
return (L->length==0);
}

bool GetEmpty(Sqlist *L,int i,int &e)
{
return (L->length==0);
}

int LocateElem(Sqlist *L,int e)
{
int i=0;
while(i<L->length && L->data[i]!=e)
{
i++;
}
if (i>=L->length)
return 0;
else
return i+1;
}

bool ListInsert(Sqlist *&L,int i,ElemType e)
{
有错误找不到了
有没有大佬帮忙找找还有一半发不出去
放在下一个了
拜托各位大佬

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
ActiveSheet.Range("$A$1:$AE$171").RemoveDuplicates Columns:=7, Header:=xlYes
立即登录