【发布时间】:2021-04-03 13:10:45
【问题描述】:
当我执行以下代码时,我会收到一条错误消息,此行 scanf("%s",A.(T+i)->CNE)
错误信息:expected identifier before '(' token|
我能知道是什么问题吗?提前致谢。
typedef struct date
{
int day;
int month;
int year;
}date;
typedef struct Student
{
char CNE[10];
char FirstName[30];
char LastName[30];
date BD;
float Grades[6];
}Student;
typedef struct Class
{
Student T[1500];
int dim;
}Class;
Class input(Class A)
{
int i=A.dim;
printf("Enter the student CNE : ");
scanf("%s",A.(T+i)->CNE);
}
【问题讨论】:
标签: c data-structures struct compiler-errors member-access