??
1.编写头文件
#define
datatype
int
struct
statcknode
{
int
num;
//编号
datatype
data;
//数据
struct
statcknode *pNext;//指针域
};
...
分类:
其他好文 时间:
2014-08-03 23:25:46
阅读次数:
285
??
??
编写头文件
struct
queue
{
int
num;
//代表数据
int
high;
//优先级1111
struct
queue *pNext;//存储下一个节点的地址
};
typedef
struct
queue
Q...
分类:
其他好文 时间:
2014-08-03 23:24:26
阅读次数:
372
很自然想起来递归:
代码:
#include
#include
using namespace std;
typedef struct tree1{
int data;
struct tree1 * lchild;
struct tree1 * rchild;
}Tree,* pTree;
void createTree(pTree & p){
int temp ;
scan...
分类:
其他好文 时间:
2014-08-03 23:23:58
阅读次数:
267
宏CONTAINING_RECORD的用处其实还是相当大的, 而且很是方便, 它的主要作用是: 根据结构体中的某成员的指针来推算出该结构体的指针! 下面从一个简单的例子开始说起: 我们定义一个结构体, 同时类型化:typedef struct{ int a; int b; ...
分类:
其他好文 时间:
2014-08-03 23:13:36
阅读次数:
304
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2896#include #include #include struct node{ int u,v,w;}q[200001];int bin[500...
分类:
其他好文 时间:
2014-08-03 22:49:36
阅读次数:
172
#include#include#include#include#include#includeint main(){ int server_sockfd,client_sockfd; int server_len,client_len; struct sockaddr_in se...
分类:
其他好文 时间:
2014-08-03 18:00:35
阅读次数:
208
旋 转卡壳水题。直接使用旋转卡壳求距离。#include #include #include #include #include using namespace std;const int MAXN=50100;struct point { int x,y;}p[MAXN];int n;int st...
分类:
其他好文 时间:
2014-08-03 17:36:05
阅读次数:
227
前几天用的结构体,结构体内还包含有结构体指针和数组以及指向字符串的指针,发现自己对这方面的东西还很容易犯错,故现在讲其中容易出错的地方写出来,分享给大家也方便自己日后查看。
typedef struct {
char name[50];
char job[50];
int age;
int people_id;
} peopleInfo;
typedef struct...
分类:
其他好文 时间:
2014-08-03 15:21:35
阅读次数:
190
1、 Dict2.1 数据结构定义dict.h// 哈希表结构typedef struct dictht { dictEntry **table; //哈希表数组指针 unsigned long size; //哈希表大小 unsigned long sizemask; //掩码...
分类:
其他好文 时间:
2014-08-03 15:11:05
阅读次数:
193
//接前一章,本节主要介绍线性区以及相关线性区的操作。
线性区
Linux通过类型为vm_area_struct的对象实现线性区。
vm_area_struct:
struct vm_area_struct {
struct mm_struct * vm_mm; /* The address space we belong to. */
unsigned long vm_start...
分类:
系统相关 时间:
2014-08-03 10:21:55
阅读次数:
497