On Tue, 6 May 2003, Abhijeet D Mhatre wrote:
I have a doubt in C++. when I pass an object to a function, the destructor gets called twice.
Are you passing an object or a pointer to the object? You should try and understand what call by value and call by reference means. Then, you will understand how many objects are created and when.