Ok, consider the following classes:
class Object { public:
I would like to provide [access to the container and its members] to the objects.
My first thought was to somehow pass a reference to the current Container object to the object constructors. But I canβt figure out how to do this.
I mixed up with "this", but I get nothing. I tried something like this:
class Object { public: Container& c
My ultimate goal is to have access to object B from inside the member method of object A.
Does anyone have an idea on how to get closer to what I'm looking for?
Thanks!
c ++ inheritance reference
jedwards
source share