码迷,mamicode.com
首页 >  
搜索关键字:typedef    ( 8832个结果
[数据结构] 二叉树的建立及其基本操作
如图: 代码:   #include #include #include #include using namespace std; char ch; typedef struct BinNode { char data; struct BinNode *lchild,*rchild; }BinNode,*BinTree; //二叉树链式...
分类:其他好文   时间:2014-06-05 09:15:24    阅读次数:203
用二叉链表实现二叉查找树(二)
/* 二叉查找树的链表实现: 以及三种遍历方式,删除节点; 查找节点; author:天下无双 Date:2014-5-28 Version:3.0 */ #include #include typedef int T;//树内节点的数据类型 using namespace std; class BiTree { private: struct BiNode{ T data;...
分类:其他好文   时间:2014-06-05 09:12:12    阅读次数:217
栈的应用举例-进行算术运算
这个例子是来自于严蔚敏的《数据结构》的栈那一节。 但是我进行了一些简单的修改,确保编译通过。 目的:利用栈 计算 “3*(7-2)”这样的字符串的算术运算的结果。 共有3个代码文件,如下: 1、mystack.h         #pragma once #define maxsize 30 typedef struct { char data[maxsize+1]; ...
分类:其他好文   时间:2014-06-05 07:35:18    阅读次数:242
一个完整的使用成员函数指针的例子
Screen.h#ifndef SCREEN_H#define SCREEN_H#include class Screen {public: typedef std::string::size_type pos; // Action is a type that can point to...
分类:其他好文   时间:2014-06-04 20:59:09    阅读次数:350
【HDOJ】1180 诡异的楼梯
bfs+优先队列。wa了N次,才发现可以停留等待楼梯变换方向。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXNUM 55 8 9 typedef struct node...
分类:其他好文   时间:2014-06-03 13:26:06    阅读次数:274
【HDOJ】1242 Rescue
BFS+优先级队列。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXNUM 205 8 9 typedef struct node_st {10 int x, y...
分类:其他好文   时间:2014-06-03 06:50:09    阅读次数:259
bmp位图
BMP文件由位图文件头、位图信息头、调色板和图像数据四部分组成(1)位图文件头1 typedef struct tagBITMAPFILEHEADER2 {3 WORD bfType; //位图文件的类型,必须为BM(1-2字节)4 DWORD b...
分类:其他好文   时间:2014-05-31 12:54:56    阅读次数:254
编译GraphLab出错
/src/graphlab-master/deps/local/include/boost/atomic/atomic.hpp:166:16: error: ‘uintptr_t’ was not declared in this scope typedef atomic atomic_uintpt...
分类:其他好文   时间:2014-05-31 11:53:03    阅读次数:345
【HDOJ】3127 WHUgirls
1 #include 2 #include 3 4 #define mymax(a, b) (a>b) ? a:b 5 6 typedef struct { 7 int x, y, c; 8 } rect_st; 9 10 rect_st rects[15];11 12 int d...
分类:其他好文   时间:2014-05-30 04:35:16    阅读次数:200
剑指OFFER之链表中倒数第k个节点(九度OJ1517)
题目描述:输入一个链表,输出该链表中倒数第k个结点。(hint: 请务必使用链表。)输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为两个整数n和k(0#include typedef struct node{ int number; struct nod...
分类:其他好文   时间:2014-05-30 00:29:13    阅读次数:325
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!