M
meadori
Not that it is that big of a deal, but Herb Sutter wrote "ExceptionalRazvan said:That depends. There are two kinds of abstract classes in C++: classes
that don't have any state and all their methods are pure virtual
(similar to Java interfaces), and classes that have some state and/or
some of the behaviour already implemented (similar to Java abstract
classes - this is the kind of stuff you'd use, for example, to implement
the Template pattern).
In both cases, you _should_ add a virtual destructor. If you don't add a
virtual destructor, then deleting a derived class instance through a
pointer to a base class spells trouble. For more information on this,
you could check out Scott Meyers' books "Exceptional C++" and "More
Exceptional C++".
C++" and "More Exceptional C++" and not Scott Meyers. Meyers wrote
"Effective C++", "More Effective C++", and "Effective STL". The series
names are easy to confuse
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]