bai_jimmy

导航

2015年5月1日 #

C语言:枚举类型

摘要: 整数常量的符号名称...#include enum _bool {false,true};int main(){ enum colors { red, orange, yellow, ... 阅读全文

posted @ 2015-05-01 17:54 bai_jimmy 阅读(145) 评论(0) 推荐(0) 编辑

C语言:结构体与数组

摘要: #include struct book{ char title[100]; char author[100]; int price;};int arr[10] = {1,2,3,4,5,6,7,8,9,10};int main(){ stru... 阅读全文

posted @ 2015-05-01 17:17 bai_jimmy 阅读(429) 评论(0) 推荐(0) 编辑

C语言:联合变量

摘要: #include union hold{ int digit; double big; char letter;};int main(){ union hold a; a.letter = 'R'; union ho... 阅读全文

posted @ 2015-05-01 16:34 bai_jimmy 阅读(290) 评论(0) 推荐(0) 编辑

C语言:将结构体存放到文件中

摘要: #include #include #define MAXTLEN 70#define MAXALEN 70#define MAXBKS 10struct book{ char title[MAXTLEN]; char author[MAXALEN]; fl... 阅读全文

posted @ 2015-05-01 16:02 bai_jimmy 阅读(2027) 评论(0) 推荐(0) 编辑

C语言:函数处理结构体

摘要: #include #include #include struct namect{ char fname[20]; //数组 char *lname; //指针 int letters;};void getinfo(struct namect *);s... 阅读全文

posted @ 2015-05-01 14:52 bai_jimmy 阅读(525) 评论(0) 推荐(0) 编辑