Connecting Tech Pros Worldwide Help | Site Map

Which destructor is called in which sequence at the end of the main program?

Mark Sullivan
Guest
 
Posts: n/a
#1: Dec 21 '07
Assume I have the following code structure:

class A .... { ..... }


class B .... { .... }

main () {

A a;
B b;

.....

}

Both objcts a and b are created at the beginning.

But when the main program reaches the end which destructor is called first:

~A()

or

~B()

?
Mark

Closed Thread