Question: 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.

Answer: 
An object cannot contain an object of the same type as itself; that's a logical impossibililty, as it would need to be larger than itself.

As you say, it could contain a pointer or reference, but not an object.

> 
> I'm using a TurboC++ version 3.0 by borland international inc.
> 
> 
> 

I've no idea why you'd use a twenty-year old compiler, and an ancient dialect of C++ that few now remember. But this was just as impossible then as it is now.
Two reasons:

1. The `struct am` type isn't *complete* until the closing `}` of the struct definition; when you try to declare `k` as an instance of `struct am`, the compiler still doesn't know how big `struct am` needs to be.
2. A struct cannot contain an *instance* of itself, since that member would also have to contain an instance of itself, which would contain an instance of itself, *ad inifinitum*; the resulting object would be inifinitely large.

A struct can contain a *pointer* to an instance of the same type because a) you can create pointers to incomplete types, and b) all struct pointer types have the same size and representation.