结构体问题
#include<stdio.h>#include<stdlib.h>
struct student
{
int nam;
char *name;
char *lesson;
}*fei
main()
{
fei=(struct student*)malloc((sizeof(struct student));
car1->name = new char[20];
car1->lesson = new char[20];
printf("请输入学生数据\n");
scanf("%d,%s,%s",&(fei->nam),fei->name,fei->lesson);
printf("nam=%d,name=%s,lesson=%s\n",fei->nam,fei->name,fei->lesson);
system("pause");
}
那里错啦。请指教