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



 DEVELOP > c-Plus-Plus > Which destructor is called in which sequence at the end of the main program?

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1
Topic: DEVELOP > c-Plus-Plus
User: "Mark Sullivan"
Date: 21 Dec 2007 12:48:26 AM
Object: Which destructor is called in which sequence at the end of the main program?
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
.

 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER