首页 > 学院 > 开发设计 > 正文

线性表

2019-11-08 00:53:47
字体:
来源:转载
供稿:网友
#include "stdio.h"  #define MaxSize 10  typedef int DataType;  #include "SeqList.h"    void main(void)  {      SeqList myList;      int i, x;        ListInitiate(&myList);      for ( i = 0; i < 10; i++ )      {          if (ListInsert(&myList, i, i+1) == 0)          {              PRintf("插入错误!/n");              return ;          }        }          if (ListDelete(&myList, 4, &x) == 0)      {          printf("Delete error!/n");          return ;      }        for (i = 0; i < ListLength(&myList); i++)      {          if (ListGet(&myList,i,&x) == 0)          {              printf("get error !/n");              return ;          }          else          {              printf("%d  ", x);          }      }  }  
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表