If I have a class like this
When the program is terminating and Marge gets destroyed, what is the order in which the destructors get called...PHP Code:#include <homer.hpp>
#include <bart.hpp>
class Marge
{
Marge();
~Marge();
Bart TheBoy;
Homer TheIdiot;
};
int main()
{
Marge TheWife;
return 0;
}
Does it destroy TheBoy, TheIdiot then the instance of Marge, TheWife.
Or
Is the order TheWife, TheIdiot, TheBoy?




Reply With Quote