The following code is generating a compile error. I Do not understand why this is not working, could anyone explain why this is the case.
struct abc {
int a;
int b;
struct abc var;
} a1;
int main()
{
printf("%d",a1.a);
return 0;
}
The above code is not working and returning error: error: field 'var' has incomplete type.
struct abc
{
int a;
int b;
struct abc *var;
} a1;
int main()
{
printf("%d",a1.a);
return 0;
}