Order in which constructors are called when an object of a derived class is created


Explain the order in which constructors are called when an object of a derived class is created.


- The constructors of any virtual base classes are called first in the order of inheritance.

- Non-virtual base class constructors are called next.

- The derived class constructor is called last.

- The derived class constructor has only access to its own class members.

No comments:

Post a Comment

The advantages of Outsourcing Web Development Services

In the present digital world, acquiring a solid web presence is essential for companies to flourish. A well designed site is much much more ...