C
Chad
The following question stems from the following thread on comp.lang.c:
http://groups.google.com/group/comp...7381a/5f20260b30952fe7?hl=en#5f20260b30952fe7
I was sort of mystified by a comment made by Eric. And I quote:
"You might also be confused by the fact that each
`struct my_struct' contains a pointer to a `struct my_struct'
object. There is nothing special about that inner pointer:
it's just a pointer. It could perfectly well be a pointer
to some completely different type of object -- it could just
as well be a `double'. The point (sorry) is that you cannot
get at that inner datum until you have a `struct my_struct'
that holds it."
So would an inner pointer of
struct mystruct {
int data;
};
struct mystruct new;
be 'internally' represented as:
struct my_struct *inner_pointer = &new;
Any clarification would be greatly appreciated.
Chad
http://groups.google.com/group/comp...7381a/5f20260b30952fe7?hl=en#5f20260b30952fe7
I was sort of mystified by a comment made by Eric. And I quote:
"You might also be confused by the fact that each
`struct my_struct' contains a pointer to a `struct my_struct'
object. There is nothing special about that inner pointer:
it's just a pointer. It could perfectly well be a pointer
to some completely different type of object -- it could just
as well be a `double'. The point (sorry) is that you cannot
get at that inner datum until you have a `struct my_struct'
that holds it."
So would an inner pointer of
struct mystruct {
int data;
};
struct mystruct new;
be 'internally' represented as:
struct my_struct *inner_pointer = &new;
Any clarification would be greatly appreciated.
Chad