会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
禅意
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2015年4月8日
数据结构(7) -- 平衡二叉树
摘要: 此版本是在数据结构(6)的基础上改造的。实现了构建平衡二叉树功能。//BinTree.h#ifndef BINTREE_H_#define BINTREE_H_#define ElemType inttypedef struct _PNode{ ElemType data; _PNode...
阅读全文
posted @ 2015-04-08 14:07 禅意
阅读(201)
评论(0)
推荐(0)
2015年4月7日
数据结构(6) -- 构建二叉搜索树
摘要: //BinTree.h#ifndef BINTREE_H_#define BINTREE_H_#define ElemType inttypedef struct _PNode{ ElemType data; _PNode *left; _PNode *right;}PNode;c...
阅读全文
posted @ 2015-04-07 13:48 禅意
阅读(283)
评论(0)
推荐(0)
2015年4月6日
数据结构(5) -- 二叉树
摘要: //BinaryTree.h#ifndef BINARYTREE_H_#define BINARYTREE_H_#define ElemType int#define MAXSIZE 100typedef struct _TreeNode{ ElemType data; //存储的数据 ...
阅读全文
posted @ 2015-04-06 22:31 禅意
阅读(167)
评论(0)
推荐(0)
数据结构(4) -- 二分查找
摘要: 源代码:#include #include using namespace std;typedef struct _Table{ int data[100]; int length;}Table;int BinarySearch(Table a, int k){ int left ...
阅读全文
posted @ 2015-04-06 11:21 禅意
阅读(128)
评论(0)
推荐(0)
数据结构(3) -- 队列
摘要: 1、线性存储//Queue.h#ifndef QUEUE_H_#define QUEUE_H_#define ElemType int #define MAXSIZE 100typedef struct _Node{ ElemType data[MAXSIZE]; int front; ...
阅读全文
posted @ 2015-04-06 00:30 禅意
阅读(167)
评论(0)
推荐(0)
2015年4月5日
数据结构(2) -- 堆栈
摘要: 1、顺序存储//栈的顺序存储实现//Stack.h#ifndef STACK_H_#define STACK_H_#define ElementType int #define MaxSize 100typedef struct _Node{ ElementType data[MaxSize]...
阅读全文
posted @ 2015-04-05 21:10 禅意
阅读(231)
评论(0)
推荐(0)
数据结构(1) -- 线性结构
摘要: 1、顺序存储//List.h#ifndef LIST_H_#define LIST_H_#define MAXSIZE 100typedef struct _Poly{ int a; int n; bool operator == (_Poly e) { if ...
阅读全文
posted @ 2015-04-05 10:21 禅意
阅读(277)
评论(0)
推荐(0)
2015年3月29日
linux nginx安装(转载)
摘要: 1.linux 下面安装 1.下载pcre-8.10.tar.gz nginx-1.1.1.tar.gz 2.安装 pcre 让nginx支持rewrite pcre-8.10.tar.gz 上传到/home 目录下面 1) 解压pcre tar zxvf pcre-8.10.tar.gz 解...
阅读全文
posted @ 2015-03-29 16:43 禅意
阅读(149)
评论(0)
推荐(0)
2015年3月25日
C++学习之路--类的构建以及数据转换存储
摘要: 注意理解下面的代码,数据的处理与转换。头文件:#ifndef STACK_H#define STACK_Hclass Stack{ struct Link { void* data; Link* next; Link(void* dat, Lin...
阅读全文
posted @ 2015-03-25 16:15 禅意
阅读(164)
评论(0)
推荐(0)
2015年3月24日
指向函数的指针数组(C++)
摘要: 我们能够创建一个指向函数的指针数组。为了选择一个函数,只需要使用数组的下标,然后间接引用这个指针。这种方式支持表格式驱动码的概念;可以根据状态变量去选择被执行函数,而不用条件语句或case语句。这种设计方式对于经常从表中添加或删除函数(或者想动态的创建或改变表)十分有用。#include using...
阅读全文
posted @ 2015-03-24 11:32 禅意
阅读(581)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告