typedef struct
{
int idno;
char name[max];
float cgpa;
}student;
struct node
{
student s;
Link next;
};
typedef struct node Node;
typedef Node *Link;
This doesnot work since compiler doesn't know about Link, but this works
In function 'main':| error: unknown type name 'Link'|
typedef struct {
int idno;
char name[max];
float cgpa;
}student;
typedef struct node Node;
typedef Node *Link;
struct node
{
student s;
Link next;
};
But here how does compiler knows before structure declaration and hence one could have them type defined?