Mike,
I'm not totally sure about this, but wouldn't you want to pass in struct A
to start with. Then, from insde someWierdFunciton you would have access
to both struct A and struct B. Unless you were trying to avoid passing in
the whole struct A setup. I could be wrong, but I don't think you can
backwards access struct A from struct B. You would just have to pass in A
and then, since A contains B, you could access B from A and anything else
in A, but you couldn't access A from B in reverse.
Anyone else? I think that's how it goes though.
Jason
On Wed, 23 Aug 2000, Mike Redick wrote:
> Ok, here's a question for all you competent C coders out there. Let's say
> we have:
>
>
> struct A
> {
>
> //stuff
>
> struct B *Bstuff;
>
> }
>
> then we have a function something like this:
>
> int SomeWierdFunction( struct B *incoming )
> {
> //stuff...
> }
>
>
> Now my question... would there be any way to get a pointer to struct A
> inside SomeWierdFunction? Err... like the struct that actually contains
> incoming?
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
> +------------------------------------------------------------+
>
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT