Multiple Inheritance and Interfaces
Summary:
Scott Meyers, C++ expert and author of numerous books including
Effective C++, talks with Bill Venners about multiple inheritance and
interface
s.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: October 4, 2005 2:04 AM by
Lee
|
In my view, the need to use dynamic_cast (and the RTTI overhead it requires) with MI class hierarchies makes widespread use of inherited C++ interface classes undesirable. It's simpler and more efficient to use interface containment in an object (by declaring an explicit pointer to each interface class). Yes, you then have to use new and delete on each pointer, but that's what your constructors and destructors are there for...
|
|