会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
闲云阁
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
9
下一页
2014年9月16日
AVL树的实现
摘要: //avl_tree.h#include using std::stack;template class AVL_TREE{public: AVL_TREE(){ nil = new AVL_NODE(0, -1, NULL, NULL); tree_root = nil; } bool fin...
阅读全文
posted @ 2014-09-16 23:07 闲云阁
阅读(199)
评论(0)
推荐(0)
2014年9月15日
windows 随机矩形绘制
摘要: windows 随机矩形绘制代码如下#includevoid DrawRect (HWND hwnd);int cxClient, cyClient;LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa...
阅读全文
posted @ 2014-09-15 23:51 闲云阁
阅读(236)
评论(0)
推荐(0)
windows api实现星空流动
摘要: 实现星空流动效果代码如下#include#includeconst int StarNum = 300;void DrawStar (HWND hwnd);int cxClient, cyClient;short arr[StarNum][3];HDC hdc;static int num= 0;L...
阅读全文
posted @ 2014-09-15 23:45 闲云阁
阅读(179)
评论(0)
推荐(0)
别踩白块儿之禅模式 windows程序实现
摘要: 别踩白块儿之禅模式 windows程序实现代码如下#include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);int WINAPI WinMain( //程序入口,WINAPI是一种函数调用约定,用于表明如何生成在堆栈中放置调用参数的机...
阅读全文
posted @ 2014-09-15 23:37 闲云阁
阅读(316)
评论(0)
推荐(0)
LZW 文本压缩及解压
摘要: LZW就是通过建立一个字符串表,用较短的代码来表示较长的字符串来实现压缩。压缩算法如下#include #include std::ifstream fin;std::ofstream fout;using namespace std;const int D = 4096, alpha = 256...
阅读全文
posted @ 2014-09-15 12:10 闲云阁
阅读(1061)
评论(0)
推荐(0)
OpenGL之路(二)设置观测矩阵和避免图形拉伸变形
摘要: 环境配置成功后,运行了示例代码,你一定发现随着窗口的拉伸变化,三角形变形了,下面就来解决这个问题代码如下#include #include #include #pragma comment(lib, "opengl32.lib")#pragma comment(lib, "glut32.lib")#...
阅读全文
posted @ 2014-09-15 10:25 闲云阁
阅读(726)
评论(0)
推荐(0)
2014年9月13日
逆波兰式与表达式求解
摘要: /***************逆波兰式即后缀表示法 预处理 ———— 中序表达式->逆序表达式(infix to postfix) 算法: while(表达式非空) if (遇到操作数) 直接输出 else if (遇到操作符op) op是( 直接入栈s op是) ...
阅读全文
posted @ 2014-09-13 20:38 闲云阁
阅读(444)
评论(0)
推荐(0)
二叉树 - 最大左高树
摘要: MaxHBLT.h#include template inline void Swap(T& a, T& b){ T c = a; a = b; b = c;}template class MaxHBLT;template class TNode{ friend MaxHBLT;public: ...
阅读全文
posted @ 2014-09-13 20:36 闲云阁
阅读(351)
评论(0)
推荐(0)
二叉树 - 最大堆
摘要: maxheap.h#include template class MaxHeap{public: MaxHeap(int num); MaxHeap(T Arr[], int arrsize, int totalsize); bool insert(const T&); bool del(T&); ...
阅读全文
posted @ 2014-09-13 20:32 闲云阁
阅读(231)
评论(0)
推荐(0)
二叉树 - 二叉排序树
摘要: binarytree.h/******************************************************************** purpose: 二叉排序树 author: xianyun1230 QQ: 83666...
阅读全文
posted @ 2014-09-13 20:30 闲云阁
阅读(194)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
下一页
公告