摘要: 1 /* 2 对终端进行读写的程序 3 */ 4 5 #include 6 #include 7 8 char *menu[] = 9 { 10 "a - add new record", 11 "d - delete record", 12 "... 阅读全文
posted @ 2015-06-27 10:31 kongchung 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 void work() 9 {10 FILE *f;11 int i;12 double x=4.5;13 f=... 阅读全文
posted @ 2015-06-27 08:48 kongchung 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 int main() 5 { 6 struct tm * tm_ptr, timestruct;//定义一个tm结构的指针tm_ptr和tm结构的timestruct 7 time_t the_time; //... 阅读全文
posted @ 2015-06-26 18:54 kongchung 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 /* 5 这个函数是对环境变量进行一些操作的 6 */ 7 int main(int argc, char * argv[]) //主函数 8 { 9 char * var, * value; ... 阅读全文
posted @ 2015-06-26 17:23 kongchung 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 从stat函数开始逐个说明stat结构的每一个成员,以了解文件的所有属性。1.函数stat,fstat,fstatat和lstat1 #include 2 int stat(const char * restrict pathname, struct stat * restrict ... 阅读全文
posted @ 2015-06-26 12:43 kongchung 阅读(254) 评论(0) 推荐(0) 编辑