Wednesday, February 2, 2011

Execution of base class constructors


Execution of base class constructors
Method of inheritance
Order of execution
Class B: public A
{
};
A( ) : base class constructor
B( ) : derived class constructor
Class A: Public B, Public C
{
};
B( ) : base class constructor
C( ) : base class constructor
A( ) : derived class constructor
Class A: Public B, virtual Public C
{
};
C( ) : base class constructor
B( ) : base class constructor
A( ) : derived class constructor

No comments:

Post a Comment