star

搜索

RSS

RSS Link

计数器

140171
迷你小游戏
表的头文件

数据结构头文件Ver1.0

Star posted @ 2010年10月03日 20:43 in C语言 with tags c 数据结构 线性表 链表 静态表 广义表 , 2051 阅读
/* 数据结构 全部结构定义文件 defs.h
 * author : star
 */

//引入所有需要的头文件 
#include <stdio.h>
#include <stdlib.h>

//防止重复定义
#ifndef DEF_H
#define DEF_H

//定义执行状态返回结果
 
#define TRUE 		 1  //成功 
#define FALSE 		 0  //失败 


#ifndef FORMATSTR
#define FORMATSTR "%d " //输出格式 

typedef int ElemType;	//基本数据类型 
#endif

//线性表 
typedef struct
{
	ElemType *data;		//数据 
	int		 size;	    //容量 
	int 	 len;	    //长度 
}SQLIST;

//单链表
typedef struct link_node
{
	ElemType          data;		//数据
	struct link_node *next;		//结点 
}NODE, *NODEPTR, *LINKLIST;

//双向链表 
typedef struct dlink_node
{
	ElemType 		   data;			//数据 
	struct dlink_node *next, *prior;	//前后结点 
}DBNODE, *DBNODEPTR, *DBLINKLIST;

//循环单向链表 原理同单链表 
//循环双向链表 原理同双向链表

//静态链表
#define SLEN 512	//静态链表长度 
typedef struct slink_node
{
	ElemType data;	//数据 
	int      next;	//指针 
}SNODE, *SLINKLIST;

/*静态链表是给没有指针的语言写的,C语言有指针,*
 *而且静态链表不实用,定义多而杂,因此不写了   */
 
//广义表
enum{ATOM,LIST};
typedef struct glist_node
{
	int tag;			//ATOM或LIST 
	union
	{
		ElemType           data;	//ATOM 
		struct glist_node *head; 	//LIST 
	}item;
	struct glist_node *next;		//结点 
}GLNODE, *GLIST;

#endif
Anonymous 说:
2020年6月29日 05:04

I can give you the address       Here you will learn how to do it correctly. Read and write something good. LeptoConnect Review

Anonymous 说:
2020年6月29日 05:09

Initial You got a awesome blog .I determination be involved in plus uniform minutes. i view you got truly very functional matters , i determination be always checking your blog blesss.LeptoConnect

Anonymous 说:
2020年6月29日 05:12

In this particular article, you will see a summary, satisfy browse this post. Resurge

Anonymous 说:
2020年6月29日 05:15

Why do only so much written on this subject? Here you see more.  Resurge Supplement

Anonymous 说:
2020年6月29日 05:17

Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written. Leptitox

Anonymous 说:
2020年7月13日 03:50

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.Leptitox Supplement

Anonymous 说:
2020年7月13日 03:57

I like to recommend exclusively fine plus efficient information and facts, hence notice it: HSV Eraser

Anonymous 说:
2020年7月13日 04:00

This post is very simple to read and appreciate without leaving any details out. Great work!  His Secret Obsession

Anonymous 说:
2020年7月13日 04:03

I should assert barely that its astounding! The blog is informational also always fabricate amazing entitys. Diabetes Freedom

Anonymous 说:
2020年7月13日 04:06

In this case you will begin it is important, it again produces a web site a strong significant internet site: Diabetes Freedom Review

Anonymous 说:
2020年7月13日 20:31

Any time you're browsing the web quite often I have found a web page that is definitely rather thought invoking like this one. Happy when I came across your blog as I greatly loved it and I look forward to your next post. We're sure to look out for the next post.. Many thanks for the nice article I will come again soon. thailand virtual phone number

Anonymous 说:
2020年7月16日 01:26

For many people this is important, so check out my profile: хотели поморие

Anonymous 说:
2020年7月16日 01:34

This is very useful, although it will be important to help simply click that web page link: хотели гърция

Anonymous 说:
2020年7月16日 01:41

So lot to occur over your amazing blog. Your blog procures me a fantastic transaction of enjoyable.. Salubrious lot beside the scene. работни обувки

Anonymous 说:
2020年7月16日 01:49

It is rather very good, nevertheless glance at the data with this handle. мебели софия

Anonymous 说:
2020年7月16日 01:54

On this subject internet page, you'll see my best information, be sure to look over this level of detail. принтери варна

Anonymous 说:
2020年7月16日 02:02

The most interesting text on this interesting topic that can be found on the net ...  чаши

Anonymous 说:
2020年7月16日 19:02

Find the best essays on     is my friend's profile page. подарък за

Anonymous 说:
2020年7月20日 01:28

For true fans of this thread I will address      is a free online! 그래프게임

Anonymous 说:
2020年7月20日 23:07

I always benefit from finding a website that provides beneficial information as I like learning interesting things. Often times when I have been to this particular site I've appreciated the nice post on this page. An awesome site and I will come back once more for more good content…  click here

Anonymous 说:
2020年7月31日 13:28

Cool you inscribe, the info is really salubrious further fascinating, I'll give you a connect to my scene.  남자지방흡입

Anonymous 说:
2020年8月05日 00:01

I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.Daftar Situs Judi

Anonymous 说:
2020年8月08日 22:46

Welcome to the party of my life      here you will learn everything about me. 밤알바

Anonymous 说:
2020年8月26日 20:00

I wrote about a similar issue, I give you the link to my site.  ups tracking

Anonymous 说:
2020年9月06日 19:08

This content is simply exciting and creative. I have been deciding on a institutional move and this has helped me with one aspect. www.gayweddingplanner.net

Anonymous 说:
2020年9月07日 00:06

Here you will learn what is important, it gives you a link to an interesting web page:  Lahore escorts service

TN 12th Question Pap 说:
2021年9月28日 19:41

Students can get the TN 12th Model Question Paper 2022 with Solutions in PDF format from the links provided on this website. (+2) HSC Regular and private students can use these Sample Papers to prepare for their exams. Students must register for the Public Exam 2022. <a href="https://jnanabhumiap.in/tn-hsc-model-paper-tamil-nadu-plus-1-plus-2-question-paper-download/">TN 12th Question Paper</a> If you are one of the students who has registered as a Regular or Private Student, it is recommended that you download these Tamil Nadu Board Plus Two Sample Paper 2022 and prepare all subjects. Model papers are a valuable resource provided by the recognised educational board.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter