I have this:
typedef struct{
field_1;
field 2;
.....
}student;
typedef struct{
student record[100];
int counter;
}List;
Then I want to add the information for each 'student', for example:
List *p;
gets(p->list[index]->field_1);
but when I compiled the code it threw this:
[Error] base operand of '->' has non-pointer type 'student'
So why can't I point to 'list' and way to access a specific 'record' in 'list'?
.operator instead of->(the second one)..