#include
#include
#include
using namespace std;
#define INFINITY DBL_MAX //无穷大
#define MAX_VERTEX_NUM 20 //最大顶点个数
enum GraphKind //图的类型
{
DG,DN,UDG,UDN//有向图、有向网、无向图、无向网
};
//弧结构
typedef struct...
分类:
其他好文 时间:
2014-06-07 01:52:18
阅读次数:
214
1.判断用户是否有权限访问相册
#import
ALAuthorizationStatus author = [ALAssetsLibraryauthorizationStatus];
if (author == kCLAuthorizationStatusRestricted || author ==kCLAuthorizationStatusDenied)
...
分类:
其他好文 时间:
2014-06-05 11:39:50
阅读次数:
265
直接上代码:
/*
二叉树的链表实现:
以及三种遍历方式:
author:天下无双
Date:2014-5-28
Version:2.0
*/
#include
#include
typedef int T;//树内节点的数据类型
using namespace std;
class BiTree
{
private:
struct BiNode{
T data;
BiN...
分类:
其他好文 时间:
2014-06-05 06:30:49
阅读次数:
273
寥寥数笔,记录我的C语言盲点笔记,只为曾经经历过,亦有误,可交流。 1.typedef来定义一个函数指针类型的方法,定义一个新的函数指针类型。:建立一个类型别名的方法很简单,在传统的变量声明表达式里用类型名替代变量名,然后把关键字typedef加在该语句的开头”。typedef int (*PFUN)(): 定义PFUN这个函数指针类型,由编译器自动来完成,比如PFUN pfun;定义了一个函数指...
分类:
编程语言 时间:
2014-06-05 03:51:00
阅读次数:
265
时间,给了我们起点,从此,我们开始创造历史
世纪秒:2000年1月1日0时0分0秒到现在的秒数
datetime.h文件:
#ifnded _DATETIME_H_
#define _DATETIME_H_
typedef unsigned char z_u8;
typedef signed char z_...
分类:
其他好文 时间:
2014-06-03 04:08:08
阅读次数:
293
typedef char status;
typedef char Telemtype;
#define NULL 0
#define OK 1
typedef struct bitnode{
Telemtype data;
struct bitnode *lchild,*rchild;
}bitnode,*bitree;
Creatbitree(bitree &t)
{
//先序创建二叉...
分类:
其他好文 时间:
2014-06-03 00:47:39
阅读次数:
195
BFS+状态压缩,做了很多状态压缩了。今晚把八数码问题给搞定了。 1 #include 2
#include 3 #include 4 #include 5 using namespace std; 6 7 typedef struct node_st
{ 8 int x, y, ...
分类:
其他好文 时间:
2014-06-02 17:14:38
阅读次数:
232
typedef struct node//该结构体代表一个结点{ int data;
//结点的数据域 struct node *next; //结点的指针域}lnode,*linklist;
//定义一个结构体变量和指向结构体的指针//用头插法创建一个链表linklist ...
分类:
其他好文 时间:
2014-06-02 05:50:31
阅读次数:
341
/***数据结构串的操作,有增删改查*串的初始化以及串的赋值等操作必须注意,在新学的时候必须注意值得传递,指针的指向以及初始化的结果*///操作效果图:代码://串的静态存储结构/**静态数组存储结构typedef
struct{ char str[MaxSize]; int l...
分类:
其他好文 时间:
2014-06-01 12:18:54
阅读次数:
292
哈希表的链地址法来解决冲突问题将所有关键字为同义词的记录存储在同一个线性链表中,假设某哈希函数产生的哈希地址在区间[0, m -
1]上,则设立一个至振兴向量Chain ChainHash[m];数据结构//链表结点typedef struct _tagNode{ int data;
...
分类:
其他好文 时间:
2014-05-31 19:23:52
阅读次数:
436