This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: class hirachy problem


Hi Kristian,

I'd make fun2 a virtual method in the CAlpha, to avoid the need to do what
you are doing.

But I understand that this is a simplified example to express the concept,
and not a particular situation, so my initial response may not be relevant.

To me there is no difference between using dynamic casts, and using the
pixelTypes technique.  Both suffer from lack-of-encapsulation.

Sincerely,
--Eljay



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