Category:数据结构’
线性表链式表示(c语言版)
- by Hector
[CODE=cplusplus]
//vs2005,vc6.0,gcc测试均通过
/*———- Link.H —————*/
typedef int DataType; /*定义节点数据类型*/
typedef struct tagLink
{
DataType data;
struct tagLink* next; //指向该结构体的指针
栈(C++模板类实现)
- by Hector
[CODE=cplusplus]
/*//////////////////////////////////////////////////////////////////////////////
// 名 称 (Unit Name): Stack.h 栈头文件
// 作 者 (Author ): Hector(张伟)
// 邮 箱 (E-mail ):
链表的顺序表示和实现(C++模板类实现)
- by Hector
[CODE=cplusplus]
/*List.h*/
#ifndef _LIST_H
#define _LIST_H
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
template
class List
{
public:
List(); //构造函数:构造一个空的线性表
//~List(); //析构函数
void