摘要: 自编题:任意给定两个字符串,比如"The UNIX...." 和 "The only ...." 如何如下显示? 用纯C实现。 1 #include <stdio.h> 2 #include <string.h> 3 #define L 23 4 #define C 80 5 typedef struct{ 6 int l, c; // lines, cols 7 } pos_t; 8 9 typedef struct {10 char *str;11 pos_t pos;12 int w, h; // the width and 阅读全文
posted @ 2012-07-15 21:56 庄庄庄 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 函数指针:看这样一个声明:void *(*)(void *)(void*(*act[3])(void *))(void *(*)(void *), void *);晕了没?用typedef分解下:原声明等价于:typedef void *(*Func)(void *);Func (Func[3])(Func, void *);即act是一个数组,该数组有3函数指针的成员,每个成员作为函数指针,返回一个void *(*)(void *)型的函数指针,同时每个成员作为函数指针其参数有两个,第一个参数的类型是void *(*)(void *)型的函数指针,第2个参数的类型是void *;分解诀窍: 阅读全文
posted @ 2012-07-15 08:00 庄庄庄 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 还没找到我满意的博客网站, 用户体验,快速简洁,方便易用是我考察的标准! 阅读全文
posted @ 2012-07-15 07:32 庄庄庄 阅读(114) 评论(0) 推荐(0) 编辑