I want to know the reason why constructors are called in the order in which objects are declared.
I read this question but i am not getting the reason specified there as a comment.
Stated reason is:
The reason for which they are constructed in the member declaration order and not in the order in the constructor is that one may have several constructors, but there is only one destructor. And the destructor destroy the members in the reverse order of construction.
Can someone please explain this?