A
aarti.sanga
Hi,
I know that when a class is created the contructors of its base
classes are called, followed by the constructors of its data members,
in the order in which they appear in the class. One reason for this
is that the derived class may be using the members of the base class.
Can someone show me an example of this? Also why are destructors
always invoked in the reverse order of constructor invocation?
Thanks in advance
I know that when a class is created the contructors of its base
classes are called, followed by the constructors of its data members,
in the order in which they appear in the class. One reason for this
is that the derived class may be using the members of the base class.
Can someone show me an example of this? Also why are destructors
always invoked in the reverse order of constructor invocation?
Thanks in advance