#include
#include
#include
struct information
{
char name [10];
char ID [10];
char classr [10];
char sex [10];
};
void insert_infor(char *name ,char *ID ,char *classr, char *sex,struct information *infor)
{
strcpy((*infor).name , name );
strcpy((*infor).ID, ID);
strcpy((*infor).classr, classr);
strcpy((*infor).sex, sex);
}
void print_infor(struct information infor)
{
printf("%s\n", infor.name);
printf("%s\n", infor.ID);
printf("%s\n", infor.classr);
printf("%s\n", infor.sex);
}
int main()
{
struct information infor1, infor2;
insert_infor("jack","1424001","14wlw","male",&infor1);
insert_infor("rose","1424002","14wlw","femal",&infor2);
print_infor(infor1);
print_infor(infor2);
return 0;
}
阅读(1619) | 评论(0) | 转发(0) |