why constructor cannt be declar virtually?
why destructor cannt be overloaded?
Answers were Sorted based on User's Feedback
Answer / subhashish sen
Constructor can't be virtual,becoz constructor is an entity
which initializes V-table(V-table contains addrress of all
the virtual functions of class).So if we declare constructor
as virtual the who will intialize V-table for this constructor.
Destructor can not be overloaded simply becoz we cant
provide argument to a destructor and also its going to
release the memory when an object goes out of scope.
| Is This Answer Correct ? | 20 Yes | 0 No |
Answer / saurabh
destructors ae not overloaded as its mere function is to
release memory ,and the objects which are going to die
soon...and u r looking for other ways to kill those objects.
| Is This Answer Correct ? | 1 Yes | 8 No |
write string class as your own class in java without using any built-in function
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is the concept of object oriented program?
Contrast OOP and SOA. What are tenets of each?
1 Answers Siebel Systems, Wipro,
what are the ways in which a constructors can be called?
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
What is destructor give example?
What's the full form of STL?
what is the difference between javap and jad utility
Write an operator overloading program to write S3+=S2.