M
Marc Schellens
If I have a base class with a public virtual member function,
a child class will grand access to its overridden memeber function
even if its private in the child class, as the compliler cannot
know at compile time that the overridden function is called, right?
Doesn't that break encapsulation?
Same with friends of the base class.
Does it make sense to declare the method in the derived class as private
then at all?
A programmer only looking at the derived class might get a wrong
impression...
marc
a child class will grand access to its overridden memeber function
even if its private in the child class, as the compliler cannot
know at compile time that the overridden function is called, right?
Doesn't that break encapsulation?
Same with friends of the base class.
Does it make sense to declare the method in the derived class as private
then at all?
A programmer only looking at the derived class might get a wrong
impression...
marc