摘要: list.c /* *把数据结构封装 * 支持变长结构体:在网络传输的过程,包的大小不固定的情况适用 *实现create , delete ,insert , find , fetch等功能 */ #include <stdio.h> #include <stdlib.h> #include <st 阅读全文
posted @ 2016-03-03 14:45 muzihuan 阅读(215) 评论(0) 推荐(0) 编辑
摘要: list.h #ifndef LIST_H__ #define LIST_H__ //插入模式 #define LLIST_FORWARD 1 #define LLIST_BACKWARD 2 //回调函数 typedef void llist_op(const void *) ; typedef 阅读全文
posted @ 2016-03-03 13:49 muzihuan 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 单向无头不循环链表 main.c #include <stdio.h> #include <stdlib.h> #include "nohead.h" int main() { int i ; int ret ; struct node_st *list = NULL ; struct score_ 阅读全文
posted @ 2016-03-02 13:27 muzihuan 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 单向有头不循环链表 list.c include <stdio.h> #include <stdlib.h> #include "list.h" //创建链表:创建一个空头链表 //失败返回NULL,成功返回list指针 list *list_create() { list * me ; me = 阅读全文
posted @ 2016-03-01 22:45 muzihuan 阅读(298) 评论(0) 推荐(0) 编辑
摘要: A9处理器:EXYNOS4412 中断:硬件产生(总是需要硬件电路上的一根中断线):USB线是有VCC、GND、D+、D-四根线组成,所以是不能产生中断的; 中断产生的一般过程:中断源产生中断------>中断控制器(根据中断优先级)------>ARM处理器 对于4412处理器来说,搞清中断源和中 阅读全文
posted @ 2016-02-28 10:12 muzihuan 阅读(5905) 评论(0) 推荐(1) 编辑
摘要: typedef:为已有的数据类型改名 typedef 已有的数据类型 新名字 ; #include <stdio.h> #include <stdlib.h> typedef int INT ;//将int改名INT /*typedef int INT ;//将int改名INT *INT i ; - 阅读全文
posted @ 2016-02-26 15:46 muzihuan 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 共用体:同一时刻只有一个发生 union 共用体名 { 数据类型 成员1; 数据类型 成员2; ....... }; 定义: #include <stdio.h> #include <stdlib.h> union test_un { int i ; float f ; double d ; cha 阅读全文
posted @ 2016-02-26 14:22 muzihuan 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 结构体定义: struct 结构体名 { 数据类型 成员1 ; 数据类型 成员2; ....... };//分号绝对不能丢 ps:结构体类型描述是不占内存空间的,所以不能直接赋值. 简单的定义与引用: #include <stdio.h> #include <stdlib.h> #define NA 阅读全文
posted @ 2016-02-26 12:05 muzihuan 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 指针函数:返回值为指针的函数 返回值 * 函数名(形参) eg:int * fun(int); 函数指针:指针指向函数 类型 (*指针类型)(形参)//注意括号 eg:int (*p)(int) #include <stdio.h> #include <stdlib.h> int add(int a 阅读全文
posted @ 2016-02-26 10:32 muzihuan 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> /* * *int a[M][N]={...}; *int *p = *a ; *int (*q)[N]= a ; * *值 a[i][j] *(a+i)+j a[i]+j p[i] *p q[i][j] *q q p+3 阅读全文
posted @ 2016-02-26 09:39 muzihuan 阅读(484) 评论(0) 推荐(0) 编辑