This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inheritance Problem


"protected:" means that a derived class has access to that
member when it is a member of the same instance.
It doesn't mean that a class B derived from A can access
protected members of *any* A instantiation.
Probably this->b won't even work ;).

Note that this isn't the correct list to ask such questions.
Perhaps you want to subscribe to tuxCPProgramming@listbot.com,
mail something to tuxCPProgramming-help@listbot.com for more
information.

-- 
Carlo Wood <carlo@alinoe.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]