0
Why destructor is called 3 time can u please explain?
1 Resposta
+ 3
What's your expected output?
When the code reaches return 0 in main() the program execution ends and the 3 objects you created are erased. The class destructor is called for each of them.