#include<stdio.h>
#include<string>
struct Student
{
int num;
char name[20];
char sex;
int age;
float score;
char address[30];
};
//结构体传带指针的参数
void PrintStruct(struct Student *pStudent)
{
printf("age = %d\n", pStudent->age);
printf("name = %s\n", pStudent->name);
}
//定义结构体指针----------
struct Student stu02;
stu02.age = 11;
strcpy_s(stu02.name, "JACK");
PrintStruct(&stu02);