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
Can comments be longer than one line?
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.
What is the difference between the compiler and the preprocessor?
Describe about storage allocation and scope of global, extern, static, local and register variables?
What is ostream in c++?
Differentiate between declaration and definition.
Explain what is class definition in c++ ?
What programming language should I learn first?
Explain static and dynamic memory allocation with an example each.
When must you use a pointer rather than a reference?
Why is it called c++?
what is pre-processor in C++?
Explain terminate() function?
How is computer programming useful in real life?
What is the maximum combined length of command line arguments including the space between adjacent arguments?