Re: [Algorithms] C++ inherited constructors
Brought to you by:
vexxed72
From: Favnir <fa...@wi...> - 2000-07-15 10:33:28
|
The only way you can do this is to define a (preferably) protected do-nothing constructor for the base class, and inherit it in the = subclass constructor. But, why in the world would you need to do this, in the first place? Are, F ----- Original Message -----=20 From: Matt Adams=20 To: gda...@li...=20 Sent: Saturday, July 15, 2000 12:22 PM Subject: [Algorithms] C++ inherited constructors Hi, I got a question about the C++ class hierarchy. class a { a () {...}; // constr a }; class b : a { b () {...}; // constr b }; b instance; When creating an instance of b, constructors for both class a and = class b are called. Is there a way to suppress the automatic calling of constructor a ? Or something like 'overloading' the old constructor by a new one ? I couldn't find anything like that in the compiler docs. Any help appreciated, Matt _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |