I am trying to define a typedef struct as follows:
typedef struct node{ int keys[2*MIN_DEGREE-1]; struct node* child[2*MIN_DEGREE]; int numkeys; int isleaf; } BNODE,*BNODEPTR; Instead of using struct node* child[2*MIN_DEGREE] why can't I declare the struct as follows:
typedef struct node{ int keys[2*MIN_DEGREE-1]; BNODEPTR child[2*MIN_DEGREE]; int numkeys; int isleaf; } BNODE,*BNODEPTR; I am little confused as to how the compiler resolves structs that has nested pointers to the same type. It will be great somebody helps me clear this up.
Thanks