摘要: 一个结构体的成员是另一个结构体 代码: # include <stdio.h> # include <stdlib.h> struct data { int year; int month; int day; }; struct student { char name[30]; int num; c 阅读全文
posted @ 2016-02-28 13:56 dire 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 1)使用结构体变量作为函数的参数 使用结构体变量作为函数的实参时,采用的是值传递,会将结构体变量所占内存单元的内容全部顺序传递给形参,形参必须是同类型的结构体变量 demo: 1 # include <stdio.h> 2 # include <stdlib.h> 3 4 //创建一个Student 阅读全文
posted @ 2016-02-28 13:45 dire 阅读(40679) 评论(0) 推荐(0) 编辑