Article Discussion
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 interfaces.
16 posts on 2 pages.      
« Previous 1 2 Next »
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: October 4, 2005 2:04 AM by Lee
Lee
Posts: 3 / Nickname: lpowell / Registered: October 3, 2005 8:06 PM
Re: Multiple Inheritance and Interfaces
October 4, 2005 2:04 AM      
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...
16 posts on 2 pages.
« Previous 1 2 Next »