随笔分类 -  C

摘要:1 #include 2 3 //图元的类型 4 enum SHAPE_TYPE{ 5 RECT_TYPE = 0, 6 CIRCLE_TYPE = 1, 7 TRIANGLE_TYPE = 2, 8 SHAPE_NUM, 9 }; 10 //为了定义三角形的坐标而设 11 struct point{ 12 f... 阅读全文
posted @ 2017-11-08 14:57 子雅陌曦 阅读(327) 评论(0) 推荐(0)
摘要:执行结果: momo@momo ~/myfile/mydev/cc % compare !2150请输入需要比较的数:1 2 8 9 21输入的数据个数是:5max=21min=1 阅读全文
posted @ 2017-11-06 14:52 子雅陌曦 阅读(627) 评论(0) 推荐(0)
摘要:执行: momo@momo:mydev/cc $ a.outpid[8675]^Ccatch the signal 2^Ccatch the signal 2^Ccatch the signal 2 阅读全文
posted @ 2017-10-30 16:04 子雅陌曦 阅读(2360) 评论(0) 推荐(0)
摘要:后续考虑实现界面程序的改进。。。 阅读全文
posted @ 2017-10-27 16:32 子雅陌曦 阅读(14772) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 int main(int argc,char **argv) 6 { 7 time_t time_now; 8 struct tm *curr_time = NULL; 9 time(&time_now); 10 printf("time_now:[%ld]\n",... 阅读全文
posted @ 2017-10-26 17:28 子雅陌曦 阅读(1557) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 /**chartoasc:char -> ascii**/ 6 int chartoasc(char c) 7 { 8 int i=0; 9 i = c; 10 return i; 11 } 12 /**asctochar:ascii -> char**/... 阅读全文
posted @ 2017-10-26 10:13 子雅陌曦 阅读(754) 评论(0) 推荐(0)