The first Ghost is the PacMan
member blinky
.
About the last order: Destroying pm1
exectutes
~PacMan(){
if (inky!= NULL)
delete inky;
cout <<"~PacMan()" << endl;
}
and then blinky
is deleted too.
If you want the opposite order, you’ve to write it here.
solved The order of destructor