《数据结构》勘误表(作者王祖俪)20170920.docxVIP

  • 2
  • 0
  • 约3.92千字
  • 约 5页
  • 2021-02-01 发布于天津
  • 举报

《数据结构》勘误表(作者王祖俪)20170920.docx

勘误表 位置 原文 勘误内容 P9 例 1-4 第8行 } }; P15 第 18 行 相当于struct _node类型 相当于struct _node*类型 P20顺序 存储结构 的线性表 定义中 第3行//存放线性表的数组 //存放线性表的数组,此处elemtype表示数 组中的兀素类型可以是任意的,比如int, char 等 P21代码 2.1 代码2.1 #i nclude stdio.h #i nclude stdlib.h #defi ne OK 1 #defi ne OVERFLOW 0 #defi ne LIST_INIT_SIZE 100 #defi ne LISTINCREMENT 10 typedef struct { char *elem; int len gth; int listsize; }SqList; int In itList(SqList *L) { L-elem = (char *)malloc(LIST_INIT_SIZE*sizeof(char)); if (!L-elem) exit(OVERFLOW); L-le ngth = 0; L-listsize=LIST_INIT_SIZE; return OK; } int mai n() { int y; SqList L; y = In itList( L); printf(y=%d

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档