一、基本数据结构 1 union m_block 2 { 3 union m_block* next; 4 unsigned int size; 5 }; 6 7 struct m_list 8 { 9 union m_block* free;...
分类:
系统相关 时间:
2014-06-19 07:59:56
阅读次数:
309
二叉树基本操作代码#include "stdafx.h"#include "stdlib.h"#include "string.h"#define MAX 100typedef char Elemtype;typedef struct BTNODE{ Elemtype data; BTN...
分类:
其他好文 时间:
2014-06-19 07:51:41
阅读次数:
251
移动鼠标并显示鼠标坐标struct MOUSE_DEC { unsigned char buf[3], phase; int x, y, btn;}; enable_mouse(&mdec); for (;;) { io_cli(); //...
分类:
其他好文 时间:
2014-06-19 06:55:18
阅读次数:
201
转载请注明出处:http://blog.csdn.net/u012860063
#include
#include
#include
struct worker
{
int num;
char name[20];
char zhicheng[10];
int wages;
int reward;
long birth;
int salary;
}
work[500],...
分类:
其他好文 时间:
2014-06-15 15:00:02
阅读次数:
318
在Linux中进程用结构体task_struct来管理一个进程所需的所有信息(所以一般较大,在32位机上,大约有1.7KB)。为了提高效率,Linux使用了一些卓越的技术。
通过slab分配task_struct结构
Linux创建进程迅速,正是因为slab分配器预先分配和重复使用task_struct,这样就避免了动态分配和释放所带来的资源消耗(毕竟一个task_struct较大,而...
分类:
系统相关 时间:
2014-06-15 12:15:30
阅读次数:
374
#include
struct BSTNode
{
int m_nval; //数据域
BSTNode *m_pleft; // 左孩子节点
BSTNode *m_pright; //右孩子节点
};
/************************************************************************
功能:在二叉排序树中 查找key值,...
分类:
其他好文 时间:
2014-06-15 12:14:04
阅读次数:
228
#includeusing namespace std;struct date{int year;int month;int day;};struct Person{string name;int age;bool gender;double salary;date birth;Person(){c...
分类:
编程语言 时间:
2014-06-15 10:37:12
阅读次数:
207
#include #include #include #include struct message{ int i; int j;};void *hello(struct message *str){ printf("child, the tid=%lu, pid=%d\n",pt...
分类:
编程语言 时间:
2014-06-15 09:40:46
阅读次数:
526
decltype关键字用于查询表达式的类型。与其他特性结合起来之后会有意想不到的效果。
decltype的语法是
decltype (expression)
实例:
#include
#include
using namespace std;
int main()
{
int i;
double d;
float f;
struct A
{
int i;
dou...
分类:
编程语言 时间:
2014-06-14 14:50:28
阅读次数:
256
#include
#include
using namespace std;
struct Node{
int x, y;
friend bool operator b.x; //x最小的节点在队首
}
};
int main(){
priority_queue PQ;
Node temp = {2, 3};
PQ...
分类:
其他好文 时间:
2014-06-14 14:03:20
阅读次数:
355