2 #include <stdlib.h> /*使用exit()函数、malloc()函数*/
3 #include <string.h> /*使用memset()函数*/
4 /****************************************************************************
5 *
6 *功能:
7 *条件编译:用于调试,详细显示执行情况
8 *编译时候,使用gcc -o x x.c -D P
9 *
10 ****************************************************************************/
11 #ifdef P
12 #define DEBUG( format, ...) printf( format, ##__VA_ARGS__)
13 #else
14 #define DEBUG(format, ...) do{}while(0)
15 #endif
16
17 /****************************************************************************
18 *
19 * 功能:
20 * 全局结构体
21 * 便于编写代码,使用了宏定义
22 * 后使用的NODE都相当于struct node
23 *
24 * **************************************************************************/
25 typedef struct node
26 {
27 int x;
28 struct node* next;
29 }NODE;
30
没有评论:
发表评论