Structure '<structurename>' cannot contain an instance of itself: <error>

A structure declares a variable and initializes it with an instance of itself.

A structure can contain instances of other structures, but not an internal instance of itself. An attempt to do so would lead to infinite recursion.

Error ID: BC30294

To correct this error

  1. Check the spelling of the initialization expression in the declaration statement.

  2. If you intend to create another instance of the same structure, you must declare and create it outside the structure.

See Also

Reference

Structure Statement

Other Resources

Structures: Your Own Data Types