Order of Initialization of Base Classes

What is the Order of Initialization of base classes for in a C++ class?

Answer:*



1. Virtual base class subobjects, no matter where they occur in the hirearchy.

2. Non Virtual immediate base classes, in the order they appear in the base class list.

3. Data members of the class in the order they are declared.

No comments: