By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,948 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,948 IT Pros & Developers. It's quick & easy.

self referential structure

P: 1
please can somebody explain - what is a self referential structure?
& how is structure used in creating self referential structures?
Nov 14 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 10K+
P: 11,448
There's no magic here; in C or C++ a structure can only be 'self referential' as in
"it contains a pointer to that structure that either points to the structure itself
either directly or indirectly through a chain of pointers".

In both C and C++ a structure S can not contain a structure S. Only pointers to
such constructs are allowed (or references).

kind regards,

Nov 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.