Answer Posted / varun
Normally 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 ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is encapsulation with example?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is destructor oops?
What is oops in simple words?
Why is abstraction used?
How can you overcome the diamond problem in inheritance?
What are the important components of cohesion?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
Why oops is important?
Give two or more real cenario of virtual function and vertual object
i got a backdoor offer in process global,Bangalore..Can i work with it?
• What are the desirable attributes for memory managment?
What is the point of oop?
Can static class have constructor?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.