why destructor is not over loaded?

Answer Posted / ramakant

Normally (in fact almost always) you never explicitly call
the destructor, it is automatically called by the C++ frame
work when the object is deleted/goes out of scope.
Therefore you would not need to overload the destructor
because the frame work always calls the default destructor.

Additionally the C++ standard defines that a conforming
compiler only allows for 1 destructor per class.

Is This Answer Correct ?    21 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the full form of oops?

603


Why do we use encapsulation in oops?

510


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1826


hi all..i want to know oops concepts clearly can any1 explain??

1675


Give two or more real cenario of virtual function and vertual object

1847






Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3550


What are benefits of oop?

627


What is difference between pop and oop?

597


Where You Can Use Interface in your Project

1419


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1636


Whats oop mean?

582


Why do we use oop?

595


What does it mean when someone says I oop?

574


Why is abstraction needed?

559


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2565