zakaria

zakaria

  • NA
  • 3
  • 4.5k

Need to know why destructor is calling 04 times?

Mar 26 2013 3:48 AM
There was a problem in our last class.(http://ideone.com/oaNbfd . i could solve it. but the problem was with the output. Here constructor should call 02 times and the destructor should call 02 times. but destructor was calling 04 times .Now ques is why it is 04 times???output was like that:
constructing1
constructing2
destructing1
destructing1
destructing1
destructing1

input file link : http://ideone.com/oaNbfd

Answers (1)