摘要: /* ============================================================================ Name : hello.c Auth... 阅读全文
posted @ 2018-08-19 15:12 wdliming 阅读(163) 评论(0) 推荐(0)
摘要: #includeenum Season{ spring, summer=100, fall=96, winter};typedef enum{ Monday, Tuesday, Wednesday, ... 阅读全文
posted @ 2018-08-19 15:05 wdliming 阅读(179) 评论(0) 推荐(0)
摘要: #include #include #include void f (int **p);void change(int *tmp_t){ *tmp_t =1; return;}/*这个函数才是真正的交... 阅读全文
posted @ 2018-08-19 15:04 wdliming 阅读(330) 评论(0) 推荐(0)
摘要: #include #include //任务槽个数.在本例中并未考虑任务换入换出,所以实际运行的任务有多少个,//就定义多少个任务槽,不可多定义或少定义#define MAX_TASKS 5//任务的栈指针uns... 阅读全文
posted @ 2018-08-19 14:59 wdliming 阅读(176) 评论(0) 推荐(0)
摘要: 参考裸编程思想。 #include //#include "ycjobject.h"// 颜色定义#define CL_BLACK 0#define CL_WHITE 1#define CL_GRAY... 阅读全文
posted @ 2018-08-19 14:57 wdliming 阅读(582) 评论(0) 推荐(0)
摘要: #include #include // 任务类型定义typedef struct _myTask{ struct _coefficient { unsigned char a; unsigned char ... 阅读全文
posted @ 2018-08-19 14:55 wdliming 阅读(194) 评论(0) 推荐(0)
摘要: #include #include int main(){ char a = 0; //int * p = (int * ) malloc (4 * sizeof(int)); int * p = (int * ... 阅读全文
posted @ 2018-08-19 14:53 wdliming 阅读(114) 评论(0) 推荐(0)
摘要: __attribute__ ((packed)) 的作用就是告诉编译器取消结构在编译过程中的优化对齐,按照实际占用字节数进行对齐,是GCC特有的语法。这个功能是跟操作系统没关系,跟编译器有关 。 __attrib... 阅读全文
posted @ 2018-08-19 14:47 wdliming 阅读(699) 评论(0) 推荐(0)
摘要: 代码如下: #include #include #include #include char ch1[]={ 'c', '+', '+'};char ch2[]={ 'c', '+', '+', '\0'};ch... 阅读全文
posted @ 2018-08-19 14:46 wdliming 阅读(117) 评论(0) 推荐(0)