2010年4月7日

Linux下的c程序---数组、malloc

摘要: #include <stdio.h>#include <stdlib.h> struct flex{ int count; double average; double scores[]; // 定义可伸缩的数组}; // 声明结构体 void showFlex(const struct flex * p); //定义函数 int main(void){ struct... 阅读全文

posted @ 2010-04-07 22:06 good_hans 阅读(1104) 评论(0) 推荐(1) 编辑

Linux下的c程序---enum、switch、strcmp

摘要: 最近开始学习Linux下c的程序设计,根据自己的学习过程,将要发一系列的文章和大家一起讨论。 #include <stdio.h>#include <string.h> // for strcmp()#include <stdbool.h> // C99 feature enum spectrum {red, orange, yellow, green, b... 阅读全文

posted @ 2010-04-07 21:22 good_hans 阅读(3073) 评论(0) 推荐(0) 编辑

导航