07 2015 档案

写程序的时候, 我们想关注什么
摘要:这是一个宽泛的命题,如果没有想过,似乎东西多了点。 当从应用的角度讲,当然功能实现起来越漂亮越好,而且能考虑到今后的一些扩展性更好,对繁琐的重复工作从构建角度做高层抽象封装就再好不过了。 从可用性角度讲,有一句话非常好:用简单的代码实现健壮的程序。 从性能上讲,个人觉的,对业务的充分理解可以解决掉其 阅读全文

posted @ 2015-07-25 00:06 ercom 阅读(350) 评论(0) 推荐(0)

[C语言]进阶|程序结构
摘要:全局变量: // main.c // Created by weichen on 15/7/14. // Copyright (c) 2015年 weichen. All rights reserved. #include <stdio.h> int gAll; // int g2 = gAll; 阅读全文

posted @ 2015-07-15 22:35 ercom 阅读(1469) 评论(0) 推荐(1)

[C语言]进阶|链表
摘要:可变数组: array.h #ifndef _ARRAY_H_ #define _ARRAY_H_ typedef struct { int *array; int size; } Array;// Array不定义成指针类型 *Array 的原因:定义成变量使用范围更广,如果定义一个指针类型,那么 阅读全文

posted @ 2015-07-13 01:20 ercom 阅读(624) 评论(0) 推荐(0)

[C语言]进阶|图形库
摘要:// main.c // Created by weichen on 15/7/7. // Copyright (c) 2015年 weichen. All rights reserved. #include <stdio.h> int main(int argc, const char * arg 阅读全文

posted @ 2015-07-07 21:29 ercom 阅读(5549) 评论(0) 推荐(0)

[C语言]进阶|结构类型: 枚举, 结构, 类型定义
摘要:枚举: // main.c #include <stdio.h> const int red = 0; const int yellow = 1; const int green = 2; int main(int argc, const char * argv[]) { /* 常量符号化:用符号而 阅读全文

posted @ 2015-07-06 02:30 ercom 阅读(2176) 评论(1) 推荐(1)