Why declaring a structure with its own identifier as an element of it is not allowed? where as a self referential structure which is declared by the same variable of the struct with a pointer symbol!
this is the code I tried out:
#include<stdio.h>
#include<conio.h>
struct am
{
int a;
struct am k; // this reported an error
};
This code reported me a error where as when i used it as a pointer it accepted it , i searched the web and i came to know that it was called the self referential structure
#include<stdio.h>
#include<conio.h>
struct ko
{
int a;
struct ko * op; // this was allowed by my compiler
};
this structure worked please brief me !
I'm using a TurboC++ version 3.0 by borland international inc.