struct Laptop
{
char model[32];
char color[16];
int price;
};
struct Student
{
char ID[15];
char Name[20];
Laptop* computer;
};
Student data[100];
int count = 0;
int input(Student* s)
{
printf("ID:");
gets_s(s->ID);
printf("Name:");
gets_s(s->Name);
printf("Computer:");
gets_s(s->computer->model);//运行有错误
getchar();
gets_s(s->computer->color);//运行有错误
getchar();
scanf_s("%d", &s->computer->price,sizeof(s->computer->price));//运行有错误
return 0;
}