输入子系统在内核中的位置:/driver/input
drivers/input/input.c: input_init ---> err = register_chrdev(INPUT_MAJOR,
"input", &input_fops); static const struct file_o...
分类:
其他好文 时间:
2014-05-05 23:34:42
阅读次数:
516
编程语言更迭至今,几乎没有人没有用过一门不用垃圾回收的语言,一方面因为C之类的语言内存管理较为困难,更重要的是因为语言越高级,越注重实际的业务逻辑,而关于内存管理的代码频繁夹杂在业务中,并不那么自然。###
没有垃圾回收的编程体验 #include #include struct node { .....
分类:
其他好文 时间:
2014-05-05 21:49:59
阅读次数:
329
??
#include
#include
typedef struct emp{
char sex[8];
char name[15];
int age;
}*emp;//这里我们用typedef把emp这个结构体变成了*emp这种指向结构体成员的结构体指针
/*typedef struct emp{
char sex[8];
char name[15];
int...
分类:
编程语言 时间:
2014-05-05 12:54:29
阅读次数:
277
//使用struct关键字来定义1个结构,级别与类保持一致,写在命名空间下面;//结构中可以定义 字段
属性 方法 构造函数 也可以通过new关键字来创建对象;//1.结构中的字段不能赋初始值;
分类:
其他好文 时间:
2014-05-05 11:00:32
阅读次数:
249
1 #include "stdio.h" 2 #include "stdlib.h" 3 4
struct list_head{ 5 struct list_head *prev; 6 struct list_head *next; 7 }; 8 9
struct task{1...
分类:
系统相关 时间:
2014-05-05 10:10:11
阅读次数:
462
在VS 2008 中,导入 lua.h 之类的头文件后,编译含有Lua函数的时候,可能会出现如下错误:
1>main.obj : error LNK2019: 无法解析的外部符号_luaL_checkinteger,该符号在函数"int __cdecl add(struct lua_State *)" (?add@@YAHPAUlua_State@@@Z) 中被引用
1>main.ob...
分类:
其他好文 时间:
2014-05-04 18:34:20
阅读次数:
376
// BTree.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include"stdlib.h"
#include"malloc.h"
#define BT BTreeNode
#define MS 10
typedef struct BT{
char data;
struct BT *left;
struct BT *right;
}BT;
...
分类:
其他好文 时间:
2014-05-04 12:45:34
阅读次数:
365
1,指针没有指向一块合法的区域1指针没有初始化12345678910111213#include #include struct aa{char
*pa;char c;}ssa,*ssb;void main(){strcpy(ssa.pa,"abc");printf("%s \n",ssa.pa);...
分类:
其他好文 时间:
2014-05-04 11:38:09
阅读次数:
278
//非递归遍历一棵树 需要借助栈
#include
#include
struct Tree
{
int nValue;
Tree *pLeft;
Tree *pRight;
};
struct Stack
{
Tree *root;
Stack *pNext;
};
Stack *pStack = NULL;
void push(Tree *root)
{
St...
分类:
其他好文 时间:
2014-05-03 20:55:41
阅读次数:
325
#include
#include
#include
#include
#include
using namespace std;
#define N 20020
struct node{
int from, to, dou, nex;
}edge[N];
int head[N], edgenum;
void add(int u, int v,int dou){
node E={u,v,dou...
分类:
其他好文 时间:
2014-05-03 15:25:32
阅读次数:
340