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