完成截图功能:
#include <iostream>
#include<malloc.h>
#include<cstdio>
#define MaxSize 50
using namespace std;
typedef char ElemType;
typedef struct
{
ElemType data[MaxSize];
int length;
} SqList;
void InitList(SqList *&L)
{
L=(SqList*)malloc(sizeof(SqList));
L->length=0;
}
void DestroyList(SqList *L)
{
free(L);
}
bool ListEmpty(SqList*L)
{
return (L->length==0);
}
int ListLength(SqList *L)
{
return L->length;
}
void DispList(SqList *L)
{
if(ListEmpty(L))
return;
for(int i=0; i<L->length; i++)
printf("%c",L->data[i]);
printf("\n");
}
bool GetElem(SqList *L,int i,ElemType &e)
{
if(i<1||i