I understand the error no. 1, 2 and 4.
But error no. 3 is somewhat confusing to me.
I have some questions
1)
Why array elements Executive[0] and Executive[1] are destroyed as soon as they are created. I have learned that objects gets

destroyed when goes out of scope or memory which is allocated in free store, need to be free .
2)
I have dynamically allocated only array elements Executive[0] and Executive[1] in free store, not Executive[]. So my

assumption is, only Executive[0] and Executive[1] should call destructor not the Executive[].

If you think I should do some homework before asking stupid questions like this then please suggest me any resources on web.
Or if you correct the code I might understand something.