when can we use virtual destructor?

Answer Posted / yaggu

Basically, the characteristics it self defines, that
constructor can not be virtual but overloaded while in the
inverse to this, the destructor can not be
overloaded....means there may be more than one constructors
in class and when you create the object of the class,
constructor invokes and when you do not need at the same
time though you define more than one constructors but with
only one destructor we can destroy the object.....that is why...

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can comments be longer than one line?

796


A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.

3612


What is the difference between the compiler and the preprocessor?

823


Describe about storage allocation and scope of global, extern, static, local and register variables?

989


What is ostream in c++?

732






Differentiate between declaration and definition.

760


Explain what is class definition in c++ ?

785


What programming language should I learn first?

774


Explain static and dynamic memory allocation with an example each.

822


When must you use a pointer rather than a reference?

776


Why is it called c++?

756


what is pre-processor in C++?

774


Explain terminate() function?

777


How is computer programming useful in real life?

765


What is the maximum combined length of command line arguments including the space between adjacent arguments?

750