What is virtual constructors/destructors?

Answer Posted / syed abdul gaffur.

CONSTRUCTOR:

Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.

DISTRUCTOR :

If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where You Can Use Interface in your Project

1429


What is protected in oop?

604


What is encapsulation in ict?

608


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1641


What is oops concept with example?

580






Why is destructor used?

585


class type to basic type conversion

1839


What is class in oop with example?

623


What is oops with example?

566


What is purpose of inheritance?

645


What does sksksk mean in text slang?

1537


Whats oop mean?

597


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(); }

1991


What does and I oop mean?

618


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2038