1.思维导图
2. 创建顺序表
1>头文件 test.h
#ifndef __TEST_H__
#define __TEST_H__#include<stdlib.h>
#include<stdio.h>
#include<string.h>#define MAX 30
//typedef int datatype;typedef struct sequence
{int data[MAX];int len;}seqlist,*seqlistPtr;seqlistPtr seq_create();#endif
2>源文件 test.c
include "test.h"seqlistPtr seq_create()
{seqlistPtr S=(seqlistPtr)malloc(sizeof(seqlist));if (NULL==S){printf("创建失败");return NULL;}printf("创建成功");S->len=0;memset(S->data,0,sizeof(S->data));return S;
}