Re: [Algorithms] C++ inherited constructors
Brought to you by:
vexxed72
From: Gabor F. <xl...@po...> - 2000-07-15 11:06:16
|
i don't know if you can supress it, but why do you want to do it? object "a" must be constructed before the construction of "b" begins , and the only way to construct-initialize "a" is thru an "a"-constructor. if you have access to the sources of "a" you can create an empty constructor for "a".... but once again... why? Gabor Gabor Farkas - student / Comenius University ,Slovak Republic ---- If my mad scientist/wizard tells me he has almost perfected my Superweapon but it still needs more testing, I will wait for him to complete the tests. No one ever conquered the world using a beta version. (www.eviloverlord.com) ---- ----- Original Message ----- From: "Matt Adams" <de...@gm...> To: <gda...@li...> 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 > |