Nokia

www.nokia.com

Interview Question

Software Engineer Interview London, England (UK)

When you have multiple classes in C++ in a hierarchy, what

  was the way in which the ctors and dtors are called.
Answer

Interview Answer

3 Answers

0

It's a FAQ; just reverse order for deletion.

Interview Candidate on Jan 24, 2012
0

When you have multiple classes in C++ in a hierarchy, what was the way in which the ctors and dtors are called

Humayun Ch on Jul 6, 2012
0

depend on if it's virtual inheritance, if not any shared base ctors will be called twice.
But generally from left to right base class in multiple inheritance. Then derived ctors.
Destructor reverse the order...

g on Nov 3, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.