WEB开发网
开发学院软件开发数据结构 数据结构-单链表(C描述) 阅读

数据结构-单链表(C描述)

 2010-05-06 11:59:04 来源:WEB开发网   
核心提示:list.htypedef int ElementType;#ifndef LIST_H_INCLUDED#define LIST_H_INCLUDEDstruct Node;typedef struct Node *PtrToNode;typedef PtrToNode List;typedef PtrToNode

list.h

typedef int ElementType;
#ifndef LIST_H_INCLUDED
#define LIST_H_INCLUDED
struct Node;
typedef struct Node *PtrToNode;
typedef PtrToNode List;
typedef PtrToNode Position;
List CreateList();
void DisposeList(List L);
List MakeEmpty(List L);
int IsEmpty(List L);
int IsLast(Position P, List L);
Position Find(ElementType X, List L);
void Delete(ElementType X, List L);
Position FindPrevious(ElementType X, List L);
void Insert(ElementType X, List L, Position P);
void DeleteList(List L);
void SetAdvance(Position P, Position NextP);
Position Header(List L);
Position First(List L);
Position Advance(Position P);
ElementType Retrieve(Position P);
#endif // LIST_H_INCLUDED

fatal.h
#ifndef FATAL_H_INCLUDED
#define FATAL_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#define Error(Str)        FatalError(Str)
#define FatalError(Str)   fprintf(stderr, "%sn", Str), exit(1)
#endif // FATAL_H_INCLUDED

list.c

1 2  下一页

Tags:数据结构 单链 描述

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接