#include<iostream.h>
#include<stdlib.h>
typedef int ElemType;
struct LNode{
ElemType data;
LNode *next;
};
//Output the list
void TraverseList(LNode *p)
{
cout<<"The list is:";
while(p!=NULL)
{
cout<<p->data<<" ";
p=p->next;
}
};
//Output the lenth of the list
void LenthList(LNode *p)
{
int number=0;
cout<<"Lenth of list:";
while(p!=NULL)
{
number++;
p=p->next;
}
cout<<number<<endl;
};
//Find the postion of the number
void FindList(LNode *p)
{
int m ,i=0,j=0;
cout<<"Enter the number you find:";
cin>>m;
while(p!=NULL)
{
i++;
if(p->data==m)
{
j++;
构造一个新的线性表 { L.elem=(Elemtype *)malloc(LIST_INIT_SIZE*sizeof(Elemtype)); if(!L.elem) exit(OVERFLOW); L.length=0;//空表长度为0 L....
线性表源代码_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 线性表源代码_计算机软件及应用_IT/计算机_专业资料。#include<stdio.h>...
线性表基本代码_计算机软件及应用_IT/计算机_专业资料。关于c语言的数据结构#include <stdio.h> #include <stdlib.h> #include #define OK 1 #define ERROR...
线性表代码线性表代码隐藏>> #include<string.h> #include<malloc.h> #include<stdlib.h> #include<stdio.h> #define maxsize 100 typedef struct Student ...
线性表代码实现_计算机软件及应用_IT/计算机_专业资料。数据结构 C语言#include <stdio.h> #include <string.h> #include <stdlib.h> //宏定义 #define ...
线性表代码示例 隐藏>> #include "stdio.h" #include "malloc.h" //---(1)预定义常量及类型--- #define OK 1 #define ERROR 0 #define OVERFLOW -2 ...
线性表的基本操作员代码_IT/计算机_专业资料。集合了线性表的素有基本操作#include<stdio.h> #include<malloc.h> #define MaxSize 50 typedef char ElemType; ...
线性表的定义源代码线性表的定义源代码隐藏>> #include<stdio.h> #include<malloc.h> #include<conio.h> #define ERROR 0 #define OK 1 #define EQUAL 1...
数据结构 线性表 顺序表 源代码C_IT/计算机_专业资料。数据结构 线性表 顺序表 源代码C,实现了新建顺序表,顺序表的插入,删除,查找。合并等功能...
热门文档