Can a Structure Contain Pointer to Itself?
You Cannot Declare a Structure Type That Contains Itself as a Member, but You Can Declare a Structure Type That Contains a Pointer to Itself as a Member. the...
You cannot declare a structure type that contains itself as a member, but you can declare a structure type that contains a pointer to itself as a member. The structure tag indicates the data type of the structure variable. The keyword struct is optional in C++.
Can structures have pointers?
The structure pointer points to the address of a memory block where the Structure is being stored. Like a pointer that tells the address of another variable of any data type (int, char, float) in memory.
Can a struct contain a member that has the same type as itself?
The book says, "A structure cannot contain an instance of itself. For example, a variable of type struct employee cannot be declared in the definition for struct employee . A pointer to struct employee, however, may be included."